diff --git a/sample-functions/AlpineFunction/Dockerfile b/sample-functions/AlpineFunction/Dockerfile index 5edd276f..234d1601 100644 --- a/sample-functions/AlpineFunction/Dockerfile +++ b/sample-functions/AlpineFunction/Dockerfile @@ -1,6 +1,6 @@ -FROM openfaas/classic-watchdog:0.18.8 as watchdog +FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog -FROM alpine:3.11 +FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.12 COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog diff --git a/sample-functions/AlpineFunction/Dockerfile.arm64 b/sample-functions/AlpineFunction/Dockerfile.arm64 deleted file mode 100644 index 5edd276f..00000000 --- a/sample-functions/AlpineFunction/Dockerfile.arm64 +++ /dev/null @@ -1,15 +0,0 @@ -FROM openfaas/classic-watchdog:0.18.8 as watchdog - -FROM alpine:3.11 - -COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog -RUN chmod +x /usr/bin/fwatchdog - -# Populate example here -# ENV fprocess="wc -l" - -RUN addgroup -g 1000 -S app && adduser -u 1000 -S app -G app -USER 1000 - -HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1 -CMD ["fwatchdog"] diff --git a/sample-functions/AlpineFunction/Dockerfile.armhf b/sample-functions/AlpineFunction/Dockerfile.armhf deleted file mode 100644 index 5edd276f..00000000 --- a/sample-functions/AlpineFunction/Dockerfile.armhf +++ /dev/null @@ -1,15 +0,0 @@ -FROM openfaas/classic-watchdog:0.18.8 as watchdog - -FROM alpine:3.11 - -COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog -RUN chmod +x /usr/bin/fwatchdog - -# Populate example here -# ENV fprocess="wc -l" - -RUN addgroup -g 1000 -S app && adduser -u 1000 -S app -G app -USER 1000 - -HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1 -CMD ["fwatchdog"] diff --git a/sample-functions/base.yml b/sample-functions/base.yml new file mode 100644 index 00000000..68909990 --- /dev/null +++ b/sample-functions/base.yml @@ -0,0 +1,10 @@ +provider: + name: openfaas + gateway: http://127.0.0.1:8080 # can be a remote server + +functions: + alpine-function: + lang: dockerfile + handler: ./alpinefunction + image: functions/alpine:latest-multiarch + platforms: linux/amd64,linux/arm64,linux/arm/7