diff --git a/docker-compose.armhf.yml b/docker-compose.armhf.yml index 50bfc1eb62fb2e2b37a734836e1b00ab63c979cc..3644404e3a8cf757bec25cb147f156bba1fad49d 100644 --- a/docker-compose.armhf.yml +++ b/docker-compose.armhf.yml @@ -3,7 +3,7 @@ services: gateway: ports: - 8080:8080 - image: functions/gateway:0.7.0-armhf + image: functions/gateway:0.7.3-armhf networks: - functions environment: @@ -15,10 +15,10 @@ services: faas_nats_port: 4222 deploy: resources: - limits: - memory: 100M + # limits: # uncomment to enable limits + # memory: 100M reservations: - memory: 50M + memory: 100M restart_policy: condition: on-failure delay: 5s @@ -34,7 +34,7 @@ services: - "/var/run/docker.sock:/var/run/docker.sock" # ports: # - 8081:8080 - image: functions/faas-swarm:0.1.5-armhf + image: functions/faas-swarm:0.2.1-armhf networks: - functions environment: @@ -47,10 +47,10 @@ services: - 'node.role == manager' - 'node.platform.os == linux' resources: - limits: - memory: 100M + # limits: # uncomment to enable limits + # memory: 100M reservations: - memory: 50M + memory: 100M restart_policy: condition: on-failure delay: 5s diff --git a/gateway/Dockerfile.armhf b/gateway/Dockerfile.armhf index 048632209b010e60708597f1515ac01da8e7e599..9a5455017d0f7bca1609a3451f67e69af38d48a3 100644 --- a/gateway/Dockerfile.armhf +++ b/gateway/Dockerfile.armhf @@ -1,4 +1,4 @@ -FROM alexellis2/go-armhf:1.7.4 +FROM golang:1.9.2 as build WORKDIR /go/src/github.com/openfaas/faas/gateway @@ -13,7 +13,7 @@ COPY plugin plugin COPY queue queue COPY server.go . -RUN GOARM=6 CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gateway . +RUN GOARM=7 CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o gateway . FROM alpine:3.6 WORKDIR /root/ @@ -27,4 +27,3 @@ COPY --from=0 /go/src/github.com/openfaas/faas/gateway/gateway . COPY assets assets RUN sed -ie s/store.json/store-armhf.json/g /root/assets/script/funcstore.js CMD ["./gateway"] - diff --git a/gateway/build.sh b/gateway/build.sh index 98d3e9e13d2e74a0bed79a149ef7e9075f0de040..f5b7293e2f7914633a77d1f90d2549e54f5a22f4 100755 --- a/gateway/build.sh +++ b/gateway/build.sh @@ -13,11 +13,12 @@ fi echo "$1" if [ "$1" ] ; then eTAG=$1 + if [ "$arch" = "armv7l" ] ; then + eTAG="$1-armhf" + fi fi echo Building functions/gateway:$eTAG docker build --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy \ -t functions/gateway:$eTAG . -f $dockerfile --no-cache - -