Dockerfile 447 B

1234567891011121314
  1. FROM golang:1.21.1-alpine as builder
  2. RUN apk update && apk add git gcc libc-dev && rm -rf /var/cache/apk/*
  3. WORKDIR /qor5
  4. COPY . .
  5. RUN set -x && go get -d -v ./...
  6. RUN GOOS=linux GOARCH=amd64 go build -o /app/entry ./example/cmd/data-resetor/
  7. FROM alpine:3.16
  8. RUN apk --update upgrade && \
  9. apk add ca-certificates && \
  10. apk add tzdata && \
  11. rm -rf /var/cache/apk/*
  12. COPY --from=builder /app/entry /bin/data-resetor
  13. CMD /bin/data-resetor