diff --git a/auth/basic-auth/Dockerfile b/auth/basic-auth/Dockerfile index de68ffd1..2506484b 100644 --- a/auth/basic-auth/Dockerfile +++ b/auth/basic-auth/Dockerfile @@ -16,7 +16,7 @@ RUN license-check -path ./ --verbose=false "OpenFaaS Authors" "OpenFaaS Author(s go build --ldflags "-s -w" -a -installsuffix cgo -o handler . && \ go test $(go list ./... | grep -v /vendor/) -cover -FROM alpine:3.10 as ship +FROM alpine:3.11 as ship # Add non-root user RUN addgroup -S app && adduser -S -g app app \ && mkdir -p /home/app \ diff --git a/auth/basic-auth/Dockerfile.arm64 b/auth/basic-auth/Dockerfile.arm64 index d71aecaa..2e647dc0 100644 --- a/auth/basic-auth/Dockerfile.arm64 +++ b/auth/basic-auth/Dockerfile.arm64 @@ -14,7 +14,7 @@ RUN license-check -path ./ --verbose=false "OpenFaaS Authors" "OpenFaaS Author(s && go test $(go list ./... | grep -v /vendor/) -cover && \ CGO_ENABLED=0 GOOS=linux go build --ldflags "-s -w" -a -installsuffix cgo -o handler . -FROM alpine:3.10 +FROM alpine:3.11 # Add non-root user RUN addgroup -S app && adduser -S -g app app \ && mkdir -p /home/app \ diff --git a/gateway/Dockerfile b/gateway/Dockerfile index 297bcf40..5332e7b7 100644 --- a/gateway/Dockerfile +++ b/gateway/Dockerfile @@ -40,7 +40,7 @@ RUN license-check -path ./ --verbose=false "Alex Ellis" "OpenFaaS Authors" "Open -X github.com/openfaas/faas/gateway/types.Arch=${ARCH}"\ -a -installsuffix cgo -o gateway . -FROM alpine:3.10 +FROM alpine:3.11 ARG ARCH="x86_64" diff --git a/gateway/Dockerfile.arm64 b/gateway/Dockerfile.arm64 index 0344f361..3a6a6d9c 100644 --- a/gateway/Dockerfile.arm64 +++ b/gateway/Dockerfile.arm64 @@ -33,7 +33,7 @@ RUN license-check -path ./ --verbose=false "Alex Ellis" "OpenFaaS Project" "Open -X github.com/openfaas/faas/gateway/version.Version=${VERSION}" \ -a -installsuffix cgo -o gateway . -FROM alpine:3.10 +FROM alpine:3.11 LABEL org.label-schema.license="MIT" \ org.label-schema.vcs-url="https://github.com/openfaas/faas" \ diff --git a/gateway/Dockerfile.armhf b/gateway/Dockerfile.armhf index 765676d7..6bb32557 100644 --- a/gateway/Dockerfile.armhf +++ b/gateway/Dockerfile.armhf @@ -33,7 +33,7 @@ RUN license-check -path ./ --verbose=false "Alex Ellis" "OpenFaaS Project" "Open -X github.com/openfaas/faas/gateway/version.Version=${VERSION}" \ -a -installsuffix cgo -o gateway . -FROM alpine:3.10 +FROM alpine:3.11 LABEL org.label-schema.license="MIT" \ org.label-schema.vcs-url="https://github.com/openfaas/faas" \ diff --git a/sample-functions/AlpineFunction/Dockerfile b/sample-functions/AlpineFunction/Dockerfile index 36e52305..5edd276f 100644 --- a/sample-functions/AlpineFunction/Dockerfile +++ b/sample-functions/AlpineFunction/Dockerfile @@ -1,6 +1,6 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog -FROM alpine:3.10 +FROM alpine:3.11 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 index 36e52305..5edd276f 100644 --- a/sample-functions/AlpineFunction/Dockerfile.arm64 +++ b/sample-functions/AlpineFunction/Dockerfile.arm64 @@ -1,6 +1,6 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog -FROM alpine:3.10 +FROM alpine:3.11 COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog diff --git a/sample-functions/AlpineFunction/Dockerfile.armhf b/sample-functions/AlpineFunction/Dockerfile.armhf index 36e52305..5edd276f 100644 --- a/sample-functions/AlpineFunction/Dockerfile.armhf +++ b/sample-functions/AlpineFunction/Dockerfile.armhf @@ -1,6 +1,6 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog -FROM alpine:3.10 +FROM alpine:3.11 COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog diff --git a/sample-functions/BaseFunctions/R/Dockerfile b/sample-functions/BaseFunctions/R/Dockerfile index 5426708b..c00c148d 100644 --- a/sample-functions/BaseFunctions/R/Dockerfile +++ b/sample-functions/BaseFunctions/R/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM artemklevtsov/r-alpine:latest diff --git a/sample-functions/BaseFunctions/coffee/Dockerfile b/sample-functions/BaseFunctions/coffee/Dockerfile index a5bd6359..875edadc 100644 --- a/sample-functions/BaseFunctions/coffee/Dockerfile +++ b/sample-functions/BaseFunctions/coffee/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM node:6.9.1-alpine diff --git a/sample-functions/BaseFunctions/dncore/Dockerfile b/sample-functions/BaseFunctions/dncore/Dockerfile index 5bae8a9b..70530783 100644 --- a/sample-functions/BaseFunctions/dncore/Dockerfile +++ b/sample-functions/BaseFunctions/dncore/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM mcr.microsoft.com/dotnet/core/sdk:2.1 as build diff --git a/sample-functions/BaseFunctions/golang/Dockerfile b/sample-functions/BaseFunctions/golang/Dockerfile index ec94daa4..1ad3f3e7 100644 --- a/sample-functions/BaseFunctions/golang/Dockerfile +++ b/sample-functions/BaseFunctions/golang/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM golang:1.11-alpine ENV CGO_ENABLED=0 diff --git a/sample-functions/BaseFunctions/java/Dockerfile b/sample-functions/BaseFunctions/java/Dockerfile index 1848a1ec..8937078d 100644 --- a/sample-functions/BaseFunctions/java/Dockerfile +++ b/sample-functions/BaseFunctions/java/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM openjdk:8u121-jdk-alpine diff --git a/sample-functions/BaseFunctions/node/Dockerfile b/sample-functions/BaseFunctions/node/Dockerfile index 784e5e0c..7ede81ed 100644 --- a/sample-functions/BaseFunctions/node/Dockerfile +++ b/sample-functions/BaseFunctions/node/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM node:6.9.1-alpine diff --git a/sample-functions/BaseFunctions/python/Dockerfile b/sample-functions/BaseFunctions/python/Dockerfile index d78c4812..b11e69cb 100644 --- a/sample-functions/BaseFunctions/python/Dockerfile +++ b/sample-functions/BaseFunctions/python/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM python:2.7-alpine diff --git a/sample-functions/CHelloWorld/src/Dockerfile b/sample-functions/CHelloWorld/src/Dockerfile index 5dd05668..2d2d5dfb 100644 --- a/sample-functions/CHelloWorld/src/Dockerfile +++ b/sample-functions/CHelloWorld/src/Dockerfile @@ -1,6 +1,6 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog -FROM alpine:3.10 as builder +FROM alpine:3.11 as builder COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog diff --git a/sample-functions/CaptainsIntent/Dockerfile b/sample-functions/CaptainsIntent/Dockerfile index a7921c9a..ba7d7781 100644 --- a/sample-functions/CaptainsIntent/Dockerfile +++ b/sample-functions/CaptainsIntent/Dockerfile @@ -1,6 +1,6 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog -FROM alpine:3.10 +FROM alpine:3.11 RUN apk --update add nodejs nodejs-npm COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog diff --git a/sample-functions/ChangeColorIntent/Dockerfile b/sample-functions/ChangeColorIntent/Dockerfile index a3369537..445c3e78 100644 --- a/sample-functions/ChangeColorIntent/Dockerfile +++ b/sample-functions/ChangeColorIntent/Dockerfile @@ -1,6 +1,6 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog -FROM alpine:3.10 +FROM alpine:3.11 RUN apk --update add nodejs nodejs-npm COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog diff --git a/sample-functions/DockerHubStats/Dockerfile b/sample-functions/DockerHubStats/Dockerfile index a8c85074..7b3e9f17 100644 --- a/sample-functions/DockerHubStats/Dockerfile +++ b/sample-functions/DockerHubStats/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM golang:1.11-alpine as builder ENV CGO_ENABLED=0 @@ -10,7 +10,7 @@ WORKDIR /go/src/github.com/openfaas/faas/sample-functions/DockerHubStats COPY . /go/src/github.com/openfaas/faas/sample-functions/DockerHubStats RUN set -ex && apk add make && make install -FROM alpine:3.10 +FROM alpine:3.11 # Needed to reach the hub RUN apk --no-cache add ca-certificates diff --git a/sample-functions/DockerHubStats/Dockerfile.armhf b/sample-functions/DockerHubStats/Dockerfile.armhf index 3dc66a84..26f56ed1 100644 --- a/sample-functions/DockerHubStats/Dockerfile.armhf +++ b/sample-functions/DockerHubStats/Dockerfile.armhf @@ -13,7 +13,7 @@ COPY . /go/src/github.com/openfaas/faas/sample-functions/DockerHubStats RUN make install -FROM alpine:3.10 +FROM alpine:3.11 # Needed to reach the hub RUN apk --no-cache add ca-certificates diff --git a/sample-functions/HostnameIntent/Dockerfile b/sample-functions/HostnameIntent/Dockerfile index 1159d8fc..a1a777cf 100644 --- a/sample-functions/HostnameIntent/Dockerfile +++ b/sample-functions/HostnameIntent/Dockerfile @@ -1,4 +1,7 @@ FROM functions/alpine:latest + +USER root + RUN apk --update add nodejs nodejs-npm COPY package.json . @@ -6,5 +9,8 @@ COPY handler.js . COPY sample.json . RUN npm i + +USER 1000 + ENV fprocess="node handler.js" CMD ["fwatchdog"] diff --git a/sample-functions/MarkdownRender/Dockerfile b/sample-functions/MarkdownRender/Dockerfile index 9d417dc2..c5dff246 100644 --- a/sample-functions/MarkdownRender/Dockerfile +++ b/sample-functions/MarkdownRender/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM golang:1.11-alpine as builder ENV CGO_ENABLED=0 @@ -13,7 +13,7 @@ COPY vendor vendor RUN go install -FROM alpine:3.10 +FROM alpine:3.11 COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog diff --git a/sample-functions/Nmap/Dockerfile b/sample-functions/Nmap/Dockerfile index a56b71ec..2aedb393 100644 --- a/sample-functions/Nmap/Dockerfile +++ b/sample-functions/Nmap/Dockerfile @@ -1,6 +1,6 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog -FROM alpine:3.10 +FROM alpine:3.11 COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog diff --git a/sample-functions/NodeInfo/Dockerfile b/sample-functions/NodeInfo/Dockerfile index 92107b55..782bea9b 100644 --- a/sample-functions/NodeInfo/Dockerfile +++ b/sample-functions/NodeInfo/Dockerfile @@ -1,11 +1,14 @@ FROM functions/alpine:latest +USER root + RUN apk --update add nodejs nodejs-npm COPY package.json . COPY main.js . RUN npm i +USER 1000 ENV fprocess="node main.js" CMD ["fwatchdog"] diff --git a/sample-functions/NodeInfo/Dockerfile.arm64 b/sample-functions/NodeInfo/Dockerfile.arm64 index 5579e5db..f637bc96 100644 --- a/sample-functions/NodeInfo/Dockerfile.arm64 +++ b/sample-functions/NodeInfo/Dockerfile.arm64 @@ -1,5 +1,7 @@ FROM functions/alpine:latest +USER root + RUN apk --update add nodejs nodejs-npm COPY package.json . @@ -7,5 +9,7 @@ COPY main.js . RUN npm i +USER 1000 + ENV fprocess="node main.js" CMD ["fwatchdog"] \ No newline at end of file diff --git a/sample-functions/NodeInfo/Dockerfile.armhf b/sample-functions/NodeInfo/Dockerfile.armhf index 5579e5db..f637bc96 100644 --- a/sample-functions/NodeInfo/Dockerfile.armhf +++ b/sample-functions/NodeInfo/Dockerfile.armhf @@ -1,5 +1,7 @@ FROM functions/alpine:latest +USER root + RUN apk --update add nodejs nodejs-npm COPY package.json . @@ -7,5 +9,7 @@ COPY main.js . RUN npm i +USER 1000 + ENV fprocess="node main.js" CMD ["fwatchdog"] \ No newline at end of file diff --git a/sample-functions/Phantomjs/Dockerfile b/sample-functions/Phantomjs/Dockerfile index ce507f8d..b7555473 100644 --- a/sample-functions/Phantomjs/Dockerfile +++ b/sample-functions/Phantomjs/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM alexellis2/phantomjs-docker:latest diff --git a/sample-functions/ResizeImageMagick/Dockerfile b/sample-functions/ResizeImageMagick/Dockerfile index 8cf55510..0adfb4ac 100644 --- a/sample-functions/ResizeImageMagick/Dockerfile +++ b/sample-functions/ResizeImageMagick/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM v4tech/imagemagick diff --git a/sample-functions/ResizeImageMagick/Dockerfile.armhf b/sample-functions/ResizeImageMagick/Dockerfile.armhf index a2139fcc..0cdac0c5 100644 --- a/sample-functions/ResizeImageMagick/Dockerfile.armhf +++ b/sample-functions/ResizeImageMagick/Dockerfile.armhf @@ -1,6 +1,6 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog -FROM arm32v6/alpine:3.10 +FROM arm32v6/alpine:3.11 RUN apk --no-cache add imagemagick diff --git a/sample-functions/SentimentAnalysis/Dockerfile b/sample-functions/SentimentAnalysis/Dockerfile index 416a4852..1a34f126 100644 --- a/sample-functions/SentimentAnalysis/Dockerfile +++ b/sample-functions/SentimentAnalysis/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM python:2.7-alpine diff --git a/sample-functions/SentimentAnalysis/Dockerfile.armhf b/sample-functions/SentimentAnalysis/Dockerfile.armhf index 87dd02b1..660cb01f 100644 --- a/sample-functions/SentimentAnalysis/Dockerfile.armhf +++ b/sample-functions/SentimentAnalysis/Dockerfile.armhf @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM arm32v7/python:2.7-slim diff --git a/sample-functions/WebhookStash/Dockerfile b/sample-functions/WebhookStash/Dockerfile index 8ced9b7a..e3d4e957 100644 --- a/sample-functions/WebhookStash/Dockerfile +++ b/sample-functions/WebhookStash/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/classic-watchdog:0.14.4 as watchdog +FROM openfaas/classic-watchdog:0.18.8 as watchdog FROM golang:1.11-alpine as builder ENV CGO_ENABLED=0 @@ -12,7 +12,7 @@ COPY handler.go . RUN go install -FROM alpine:3.10 +FROM alpine:3.11 COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog diff --git a/sample-functions/WordCountFunction/Dockerfile b/sample-functions/WordCountFunction/Dockerfile index 4195b50e..d577d96c 100644 --- a/sample-functions/WordCountFunction/Dockerfile +++ b/sample-functions/WordCountFunction/Dockerfile @@ -1,5 +1,10 @@ FROM functions/alpine:latest +USER root + # Populate example here ENV fprocess="wc" + +USER 1000 + CMD ["fwatchdog"] diff --git a/sample-functions/echo/Dockerfile b/sample-functions/echo/Dockerfile index fcccb301..58607725 100644 --- a/sample-functions/echo/Dockerfile +++ b/sample-functions/echo/Dockerfile @@ -1,2 +1,3 @@ FROM functions/alpine:latest + ENV fprocess "/bin/cat" diff --git a/sample-functions/figlet/Dockerfile b/sample-functions/figlet/Dockerfile index f1bda965..7c751dc9 100644 --- a/sample-functions/figlet/Dockerfile +++ b/sample-functions/figlet/Dockerfile @@ -1,8 +1,11 @@ FROM functions/alpine:latest +USER root + RUN apk add --no-cache figlet ENV fprocess="figlet" +USER 1000 HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1 CMD ["fwatchdog"] \ No newline at end of file diff --git a/sample-functions/figlet/Dockerfile.armhf b/sample-functions/figlet/Dockerfile.armhf index f1bda965..a8b65ed0 100644 --- a/sample-functions/figlet/Dockerfile.armhf +++ b/sample-functions/figlet/Dockerfile.armhf @@ -1,7 +1,9 @@ FROM functions/alpine:latest +USER root RUN apk add --no-cache figlet +USER 1000 ENV fprocess="figlet" HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1 diff --git a/sample-functions/gif-maker/Dockerfile b/sample-functions/gif-maker/Dockerfile index d5b8d4c9..24c56b90 100644 --- a/sample-functions/gif-maker/Dockerfile +++ b/sample-functions/gif-maker/Dockerfile @@ -1,7 +1,12 @@ FROM functions/alpine:latest +USER root + RUN apk add ffmpeg gifsicle WORKDIR /root/ COPY entry.sh . ENV fprocess="./entry.sh" + +USER 1000 + CMD ["fwatchdog"] diff --git a/sample-functions/pwgen/Dockerfile b/sample-functions/pwgen/Dockerfile index e56dd987..cc2d4cf0 100644 --- a/sample-functions/pwgen/Dockerfile +++ b/sample-functions/pwgen/Dockerfile @@ -1,5 +1,9 @@ FROM functions/alpine:latest - + +USER root + RUN apk add --no-cache pwgen +USER 1000 + ENV fprocess="xargs pwgen -s"