From c062e4dbde085a65cb1b70da92f60b3cdc4698d5 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Sun, 2 Sep 2018 23:36:57 +0300 Subject: [PATCH] Sample-functions: Get watchdog using curl instead of ADD - arm64 Convert all sample-functions to use curl to get the watchdog as it can be cached by Docker. Issue #841 Signed-off-by: Radoslav Dimitrov --- sample-functions/AlpineFunction/Dockerfile.arm64 | 8 ++++---- sample-functions/NodeInfo/Dockerfile.arm64 | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sample-functions/AlpineFunction/Dockerfile.arm64 b/sample-functions/AlpineFunction/Dockerfile.arm64 index 36dee0c6..c04ee441 100644 --- a/sample-functions/AlpineFunction/Dockerfile.arm64 +++ b/sample-functions/AlpineFunction/Dockerfile.arm64 @@ -1,8 +1,8 @@ -FROM arm64v8/alpine:3.7 +FROM alpine:3.7 -ADD https://github.com/alexellis/faas/releases/download/0.9.0/fwatchdog-arm64 /usr/bin/fwatchdog -# COPY ./fwatchdog /usr/bin/ -RUN chmod +x /usr/bin/fwatchdog +RUN apk --no-cache add curl \ + && curl -sL https://github.com/openfaas/faas/releases/download/0.9.0/fwatchdog-arm64 > /usr/bin/fwatchdog \ + && chmod +x /usr/bin/fwatchdog # Populate example here # ENV fprocess="wc -l" diff --git a/sample-functions/NodeInfo/Dockerfile.arm64 b/sample-functions/NodeInfo/Dockerfile.arm64 index b6a8586e..e226ed49 100644 --- a/sample-functions/NodeInfo/Dockerfile.arm64 +++ b/sample-functions/NodeInfo/Dockerfile.arm64 @@ -1,9 +1,10 @@ -FROM arm64v8/alpine:3.7 +FROM alpine:3.7 RUN apk --update add nodejs nodejs-npm -ADD https://github.com/openfaas/faas/releases/download/0.9.0/fwatchdog-arm64 /usr/bin/fwatchdog -RUN chmod +x /usr/bin/fwatchdog +RUN apk --no-cache add curl \ + && curl -sL https://github.com/openfaas/faas/releases/download/0.9.0/fwatchdog-arm64 > /usr/bin/fwatchdog \ + && chmod +x /usr/bin/fwatchdog COPY package.json . COPY main.js .