Skip to content

Commit

Permalink
add ssl certs to scratch image (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
amgxv authored Dec 16, 2024
1 parent 6f34dee commit 9f08983
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ 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

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"]

0 comments on commit 9f08983

Please sign in to comment.