Compare commits

...

2 Commits

Author SHA1 Message Date
af00d3baf2 Split Dockerfile 2018-08-07 21:58:10 -07:00
2cee9c8513 WIP for compiling rpi2 images 2018-08-03 17:58:29 -07:00
3 changed files with 21 additions and 1 deletions

View File

@ -9,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 alpine:latest
FROM busybox:latest
WORKDIR /root/
COPY --from=builder /go/src/app/dsched .

16
Dockerfile.arm32v7 Normal file
View 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" ]

View File

@ -39,6 +39,10 @@ dep-update:
docker-build:
docker build -t $(DOCKER_TAG) .
.PHONY: docker-build-arm
docker-build-arm:
docker build -t $(DOCKER_TAG)-arm32v7 ./Dockerfile.arm32v7
.PHONY: docker-run
docker-run:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --name $(DOCKER_TAG)-run $(DOCKER_TAG)