switch to chainguard images

This commit is contained in:
Seraphim Strub 2024-02-12 17:03:15 +00:00
parent 4e3e775dc5
commit 1c2c1b311b
3 changed files with 7 additions and 13 deletions

View file

@ -1,20 +0,0 @@
FROM golang:latest as builder
ARG GO_CMD=funbot
ENV CGO_ENABLED=0 \
GOARCH=amd64 \
GOOS=linux
WORKDIR /app
ADD . /app/
RUN go build -ldflags "-X main.release=$(git rev-parse --short HEAD) -s -w -extldflags '-static'" -o /main ./cmd/${GO_CMD}/
FROM scratch
COPY --chown=65534:0 --from=builder /main /
COPY --chown=65534:0 --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
USER 65534
WORKDIR /
CMD ["/main"]