Publish multi-arch alpine base

This makes functions/alpine:latest into a multi-arch image.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2020-12-16 22:34:57 +00:00
parent 27f5c34389
commit 83d3a1ef87
4 changed files with 12 additions and 32 deletions

View File

@ -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

View File

@ -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"]

View File

@ -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"]

10
sample-functions/base.yml Normal file
View File

@ -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