| FROM golang:latest 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 |
| LABEL maintainer "me@avm99963.com" |
| |
| RUN apk add --no-cache tini |
| COPY --from=builder /go/bin/gitwatcher / |
| ENTRYPOINT ["/sbin/tini", "--", "/gitwatcher"] |