You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
385 B

# Docker image definition
FROM golang:1.24-bookworm as go-build
WORKDIR /go/src/app
COPY ./*go .
RUN go mod init bbb
RUN go mod tidy
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -o /bbb .
# final image
FROM gcr.io/distroless/static-debian12:nonroot
USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot --from=go-build /bbb /app/
ENTRYPOINT ["./bbb"]