Adrià Vilanova MartÃnez | 250457f | 2021-08-08 01:23:14 +0200 | [diff] [blame] | 1 | FROM golang:latest as builder |
| 2 | |
| 3 | ENV CGO_ENABLED=0 |
| 4 | |
| 5 | ENV GO111MODULE=on |
| 6 | ENV GOPROXY=https://proxy.golang.org |
| 7 | |
| 8 | RUN mkdir /gocache |
| 9 | ENV GOCACHE /gocache |
| 10 | |
| 11 | WORKDIR /go/src/gomodules.avm99963.com/gitwatcher |
| 12 | COPY . /go/src/gomodules.avm99963.com/gitwatcher |
| 13 | |
| 14 | # Optimization for iterative docker build speed, not necessary for correctness: |
| 15 | |
| 16 | RUN go install gomodules.avm99963.com/gitwatcher |
| 17 | |
| 18 | FROM alpine |
| 19 | LABEL maintainer "me@avm99963.com" |
| 20 | |
| 21 | RUN apk add --no-cache tini |
| 22 | COPY --from=builder /go/bin/gitwatcher / |
| 23 | ENTRYPOINT ["/sbin/tini", "--", "/gitwatcher"] |