initial commit
This commit is contained in:
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
ARG GO_IMAGE=docker.io/library/golang:1.22.5-bookworm
|
||||
ARG BASE_IMAGE=gcr.io/distroless/static-debian12:nonroot
|
||||
|
||||
## ---
|
||||
|
||||
FROM ${GO_IMAGE} as build
|
||||
SHELL [ "/bin/sh", "-ec" ]
|
||||
|
||||
ARG GOPROXY
|
||||
ARG GOSUMDB
|
||||
ARG GOPRIVATE
|
||||
|
||||
ARG RELMODE
|
||||
|
||||
WORKDIR /go/src
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV GOMAXPROCS=4 \
|
||||
MALLOC_ARENA_MAX=4
|
||||
|
||||
RUN go env | grep -F -e GOPROXY -e GOSUMDB ; \
|
||||
make OUTDIR=/go/bin ; \
|
||||
make ci-clean
|
||||
|
||||
## ---
|
||||
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
COPY --from=build /go/bin/rngpotd /bin/
|
||||
|
||||
ENTRYPOINT [ "/bin/rngpotd" ]
|
||||
CMD [ ]
|
||||
|
||||
USER nonroot:nonroot
|
Reference in New Issue
Block a user