Dockerfile 344 B

12345678910111213141516171819202122232425262728
  1. # syntax=docker/dockerfile:1
  2. ## Build
  3. FROM golang:1.19-buster AS build
  4. WORKDIR /app
  5. COPY go.mod ./
  6. COPY go.sum ./
  7. RUN go mod download
  8. COPY *.go ./
  9. RUN go build -o /gamo
  10. ## Deploy
  11. FROM gcr.io/distroless/cc-debian11
  12. WORKDIR /
  13. COPY --from=build /gamo /gamo
  14. EXPOSE 8080
  15. USER nonroot:nonroot
  16. ENTRYPOINT [ "/gamo", "--bind=0.0.0.0:8080" ]