dockron/Dockerfile

18 lines
390 B
Docker
Raw Normal View History

2018-08-04 00:58:29 +00:00
ARG repo_arch
FROM ${repo_arch}golang:1.10 AS builder
2018-08-03 18:35:49 +00:00
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/
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o dsched .
2018-08-04 00:58:29 +00:00
FROM ${repo_arch}busybox:latest
2018-08-03 18:35:49 +00:00
WORKDIR /root/
COPY --from=builder /go/src/app/dsched .
CMD [ "./dsched" ]