open-build-service icon indicating copy to clipboard operation
open-build-service copied to clipboard

Please make Docker "scratch" image available for build

Open kkaempf opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. To achieve minimal image sizes, multi-layer docker builds are typically used. You start with a "big" image, install/copy/build what you need and finalize with

FROM opensuse/leap:15.3 as build
...
FROM scratch as final
COPY --from=build /usr/bin/final-binary /usr/bin/final-binary

However, scratch is not a Docker build-in, but pulled from Docker hub. So the above Dockerfile fails with

msg="Error getting v2 registry: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:44522->[::1]:53: read: connection refused"

Describe the solution you'd like scratch is part of the build-service-provided registry and FROM scratch in Docker builds doesn't fail.

Describe alternatives you've considered There's no alternative to FROM scratch when building with Docker.

Additional context https://build.opensuse.org/package/show/home:kwk:elemental:images/ros-operator-image

kkaempf avatar Mar 08 '22 14:03 kkaempf

have you tried against the docker hub DoD project?

Just add Docker:Registry/standard as a path.

adrianschroeter avatar Mar 08 '22 14:03 adrianschroeter

Have you tried with BuildEngine: podman?

Vogtinator avatar Mar 24 '22 12:03 Vogtinator

Just add Docker:Registry/standard as a path.

Done that. Project is blocked on waiting for dod resources to appear: container:suse/sle15:15.3 for ~24 hours now :-(

kkaempf avatar Apr 07 '22 08:04 kkaempf