dockron/Dockerfile

17 lines
355 B
Docker
Raw Normal View History

2018-08-03 18:35:49 +00:00
FROM golang:1.10 AS builder
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/
2018-08-04 02:22:54 +00:00
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o dockron .
2018-08-03 18:35:49 +00:00
2018-08-12 21:19:23 +00:00
FROM busybox:latest
2018-08-03 18:35:49 +00:00
WORKDIR /root/
2018-08-04 02:22:54 +00:00
COPY --from=builder /go/src/app/dockron .
2018-08-03 18:35:49 +00:00
2018-08-04 02:22:54 +00:00
CMD [ "./dockron" ]