| FROM golang:latest@sha256:672a2286da3ee7a854c3e0a56e0838918d0dbb1c18652992930293312de898a6 as builder |
| |
| ENV CGO_ENABLED=0 |
| |
| ENV GO111MODULE=on |
| ENV GOPROXY=https://proxy.golang.org |
| |
| RUN mkdir /gocache |
| ENV GOCACHE /gocache |
| |
| WORKDIR /go/src/gomodules.avm99963.com/gitwatcher |
| COPY . /go/src/gomodules.avm99963.com/gitwatcher |
| |
| # Optimization for iterative docker build speed, not necessary for correctness: |
| |
| RUN go install gomodules.avm99963.com/gitwatcher |
| |
| FROM alpine@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48 |
| LABEL maintainer "me@avm99963.com" |
| |
| RUN apk add --no-cache tini |
| COPY --from=builder /go/bin/gitwatcher / |
| ENTRYPOINT ["/sbin/tini", "--", "/gitwatcher"] |