dockron/Dockerfile.multi-stage
Ian Fijolek 0791c6afa3
Some checks failed
continuous-integration/drone/push Build is failing
WIP: Mutli-stage build not working
2019-06-07 17:08:15 -07:00

17 lines
345 B
Docker

ARG REPO=library
FROM ${REPO}/golang:1.11-alpine AS builder
COPY ./go.mod ./go.sum /go/src/app/
RUN go mod download
COPY ./main.go /go/src/app/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -a -installsuffix nocgo -o dockron .
FROM ${REPO}/busybox:latest
WORKDIR /root/
COPY --from=builder /go/src/app/dockron .
CMD [ "./dockron" ]