17 lines
368 B
Docker
17 lines
368 B
Docker
|
FROM arm32v7/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/
|
||
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o dsched .
|
||
|
|
||
|
FROM arm32v7/busybox:latest
|
||
|
WORKDIR /root/
|
||
|
COPY --from=builder /go/src/app/dsched .
|
||
|
|
||
|
CMD [ "./dsched" ]
|