Upgrade to alpine:3.15 where possible

Upgrades OS for some base images, no expected issues.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2022-02-21 10:30:22 +00:00
parent e29d96a172
commit b4293967d2
25 changed files with 37 additions and 33 deletions

View File

@ -26,7 +26,7 @@ RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go test -v
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build \
--ldflags "-s -w" -a -installsuffix cgo -o handler .
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.14 as ship
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.15 as ship
# Add non-root user
RUN addgroup -S app && adduser -S -g app app \
&& mkdir -p /home/app \

View File

@ -46,7 +46,7 @@ RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build --
-X github.com/openfaas/faas/gateway/types.Arch=${TARGETARCH}" \
-a -installsuffix cgo -o gateway .
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.14 as ship
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.15 as ship
LABEL org.label-schema.license="MIT" \
org.label-schema.vcs-url="https://github.com/openfaas/faas" \

View File

@ -1,6 +1,6 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.14
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.15
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM artemklevtsov/r-alpine:latest

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM node:6.9.1-alpine

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 as build

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM golang:1.13-alpine
ENV CGO_ENABLED=0

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM openjdk:8u121-jdk-alpine

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM node:6.9.1-alpine

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM python:2.7-alpine

View File

@ -1,6 +1,6 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM alpine:3.14 as builder
FROM alpine:3.15 as builder
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

View File

@ -1,6 +1,6 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM alpine:3.14
FROM alpine:3.15 as ship
RUN apk --update add nodejs nodejs-npm
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog

View File

@ -1,6 +1,6 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM alpine:3.14
FROM alpine:3.15 as ship
RUN apk --update add nodejs nodejs-npm
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM golang:1.13-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.14
FROM alpine:3.15 as ship
# Needed to reach the hub
RUN apk --no-cache add ca-certificates

View File

@ -13,7 +13,7 @@ COPY . /go/src/github.com/openfaas/faas/sample-functions/DockerHubStats
RUN make install
FROM alpine:3.14
FROM alpine:3.15 as ship
# Needed to reach the hub
RUN apk --no-cache add ca-certificates

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM golang:1.13-alpine as builder
ENV CGO_ENABLED=0
@ -13,7 +13,7 @@ COPY vendor vendor
RUN go install
FROM alpine:3.14
FROM alpine:3.15 as ship
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

View File

@ -1,6 +1,6 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM alpine:3.14
FROM alpine:3.15 as ship
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM alexellis2/phantomjs-docker:latest

View File

@ -1,3 +1,7 @@
## Note: this page contains legacy examples.
To learn how to build functions, see the official training page in the docs: [Training](https://docs.openfaas.com/tutorials/training/)
## Hello World in different languages:
For examples of hello-world in different programming languages see inside the BaseFunctions folder:

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM v4tech/imagemagick

View File

@ -1,6 +1,6 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM arm32v6/alpine:3.14
FROM arm32v6/alpine:3.15
RUN apk --no-cache add imagemagick

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM python:2.7-alpine

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM arm32v7/python:2.7-slim

View File

@ -1,4 +1,4 @@
FROM openfaas/classic-watchdog:0.18.8 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM golang:1.13-alpine as builder
ENV CGO_ENABLED=0
@ -12,7 +12,7 @@ COPY handler.go .
RUN go install
FROM alpine:3.14
FROM alpine:3.15 as ship
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog

View File

@ -1,6 +1,6 @@
FROM openfaas/classic-watchdog:0.18.1 as watchdog
FROM ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
FROM alpine:3.14
FROM alpine:3.15 as ship
RUN mkdir -p /home/app