switch to chainguard images
This commit is contained in:
parent
4e3e775dc5
commit
1c2c1b311b
3 changed files with 7 additions and 13 deletions
19
Containerfile
Normal file
19
Containerfile
Normal file
|
@ -0,0 +1,19 @@
|
|||
FROM cgr.dev/chainguard/go:latest as build
|
||||
|
||||
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 cgr.dev/chainguard/static:latest
|
||||
COPY --chown=65534:0 --from=build /main /
|
||||
USER 65534
|
||||
WORKDIR /
|
||||
|
||||
CMD ["/main"]
|
Loading…
Add table
Add a link
Reference in a new issue