FROM golang:1.13.9-alpine LABEL maintainer "Stakater Team" RUN apk -v --update \ --no-cache \ add git build-base WORKDIR "$GOPATH/src/github.com/stakater/Reloader" COPY go.mod go.sum ./ RUN go mod download COPY . . ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64 RUN go build -a --installsuffix cgo --ldflags="-s" -o /Reloader COPY build/package/Dockerfile.run / # Running this image produces a tarball suitable to be piped into another # Docker build command. CMD tar -cf - -C / Dockerfile.run Reloader