diff --git a/Dockerfile b/Dockerfile index 0b321d3..9e19727 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ RUN go get -d -v RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build \ -ldflags="-X 'github.com/jonasvinther/medusa/cmd.Version=${VERSION}'" \ -o /go/bin/medusa +RUN apk add ca-certificates && update-ca-certificates RUN adduser -S scratchuser RUN chown scratchuser /go/bin/medusa @@ -22,5 +23,7 @@ RUN chown scratchuser /go/bin/medusa FROM scratch COPY --from=builder /go/bin/medusa /medusa COPY --from=builder /etc/passwd /etc/passwd +COPY --from=builder /usr/share/ca-certificates/mozilla/* /etc/ssl/certs/ + USER scratchuser ENTRYPOINT ["/medusa"]