Dockerfile 317 B

1234567891011121314
  1. FROM golang:1.11.4-alpine3.8 AS envir
  2. RUN apk --no-cache add git gcc musl-dev
  3. WORKDIR /github/gr792kkm
  4. RUN git clone https://github.com/gr792kkm/lpr.git
  5. WORKDIR /github/gr792kkm/lpr
  6. RUN go mod init
  7. RUN go mod tidy
  8. RUN go build -o /app .
  9. FROM alpine:3.8
  10. COPY --from=envir /app /app
  11. ENTRYPOINT ["/app"]