Initial work for ARMHF

This commit is contained in:
Alex Ellis
2017-01-24 19:38:06 +00:00
parent 07ee1f22d5
commit 5c343be183
6 changed files with 80 additions and 1 deletions

View File

@ -0,0 +1,16 @@
FROM alexellis2/go-armhf:1.7.4
RUN go get -d github.com/docker/docker/api/types \
&& go get -d github.com/docker/docker/api/types/filters \
&& go get -d github.com/docker/docker/api/types/swarm \
&& go get -d github.com/docker/docker/client \
&& go get github.com/gorilla/mux \
&& go get github.com/prometheus/client_golang/prometheus
WORKDIR /go/src/github.com/alexellis/faas/gateway
COPY metrics metrics
COPY server.go .
RUN find /go/src/github.com/alexellis/faas/gateway/
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .

13
gateway/armhf.build.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
echo Building alexellis2/faas-gateway:build-armhf
docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \
-t alexellis2/faas-gateway:build-armhf . -f Dockerfile.build.armhf
docker create --name gateway_extract alexellis2/faas-gateway:build-armhf echo
docker cp gateway_extract:/go/src/github.com/alexellis/faas/gateway/app ./gateway
docker rm -f gateway_extract
echo Building alexellis2/faas-gateway:latest-armhf
docker build -t alexellis2/faas-gateway:latest-armhf .