Split Dockerfile
This commit is contained in:
parent
2cee9c8513
commit
af00d3baf2
@ -1,5 +1,4 @@
|
||||
ARG repo_arch
|
||||
FROM ${repo_arch}golang:1.10 AS builder
|
||||
FROM golang:1.10 AS builder
|
||||
|
||||
RUN go get -u github.com/golang/dep/cmd/dep
|
||||
|
||||
@ -10,7 +9,7 @@ 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 ${repo_arch}busybox:latest
|
||||
FROM busybox:latest
|
||||
WORKDIR /root/
|
||||
COPY --from=builder /go/src/app/dsched .
|
||||
|
||||
|
16
Dockerfile.arm32v7
Normal file
16
Dockerfile.arm32v7
Normal file
@ -0,0 +1,16 @@
|
||||
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" ]
|
Loading…
Reference in New Issue
Block a user