Dockerfile 455 B

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