Compare commits
2 Commits
master
...
arm-target
Author | SHA1 | Date | |
---|---|---|---|
af00d3baf2 | |||
2cee9c8513 |
@ -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
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" ]
|
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 -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)
|
||||
|
Loading…
Reference in New Issue
Block a user