dockron/Dockerfile
Ian Fijolek 7c6e536ec3
All checks were successful
continuous-integration/drone/push Build is passing
Try out multi arch builds
2019-06-07 15:40:04 -07:00

21 lines
445 B
Docker

ARG REPO=library
FROM golang:1.11-alpine AS builder
RUN apk add --no-cache git
RUN go get -u github.com/golang/dep/cmd/dep
WORKDIR /go/src/app/
COPY ./Gopkg.* /go/src/app/
RUN dep ensure --vendor-only
COPY ./main.go /go/src/app/
ARG ARCH=amd64
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" ]