Containerfile: use scratch-with-cacerts directly

This commit is contained in:
leo 2023-03-09 14:38:48 +01:00
parent 712e587afc
commit fd10da2453
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -1,5 +1,3 @@
FROM ghcr.io/mariouhrik/scratch-with-cacerts as certs
FROM docker.io/library/golang:1.20.1 as build
COPY . /certs-test
@ -7,8 +5,7 @@ WORKDIR /certs-test
RUN CGO_ENABLED=0 go build -v .
FROM scratch
FROM ghcr.io/mariouhrik/scratch-with-cacerts
COPY --from=build /certs-test/certs-test /certs-test
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ENTRYPOINT ["/certs-test"]