WIP for compiling rpi2 images
This commit is contained in:
parent
e032fe6a66
commit
2cee9c8513
@ -1,4 +1,5 @@
|
||||
FROM golang:1.10 AS builder
|
||||
ARG repo_arch
|
||||
FROM ${repo_arch}golang:1.10 AS builder
|
||||
|
||||
RUN go get -u github.com/golang/dep/cmd/dep
|
||||
|
||||
@ -9,7 +10,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 ${repo_arch}busybox:latest
|
||||
WORKDIR /root/
|
||||
COPY --from=builder /go/src/app/dsched .
|
||||
|
||||
|
4
Makefile
4
Makefile
@ -39,6 +39,10 @@ dep-update:
|
||||
docker-build:
|
||||
docker build -t $(DOCKER_TAG) .
|
||||
|
||||
.PHONY: docker-build-arm
|
||||
docker-build-arm:
|
||||
docker build --build-arg repo_arch=arm32v7/ -t $(DOCKER_TAG)-arm32v7 .
|
||||
|
||||
.PHONY: docker-run
|
||||
docker-run:
|
||||
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --name $(DOCKER_TAG)-run $(DOCKER_TAG)
|
||||
|
Loading…
Reference in New Issue
Block a user