Skip to content

Commit

Permalink
Update of-watchdog to 0.10.4 and Python to 3.12
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Jul 16, 2024
1 parent 296d57b commit eb5fb46
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Are you referencing pip modules which require a native build toolchain? It's adv
## Python Versioning
We try to keep the default Python 3 version up-to-date, however, you can specify a specific python version using the `PYTHON_VERSION` build argument.

The current stable version of python is 3.11, you might want to test the next pre-release using
The current stable version of Python is 3.12, you might want to test the next pre-release using:

```yaml
functions:
Expand Down
6 changes: 3 additions & 3 deletions template/python27-flask/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
FROM python:2.7-alpine as build
FROM ghcr.io/openfaas/of-watchdog:0.10.4 AS watchdog
FROM python:2.7-alpine AS build

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
Expand Down Expand Up @@ -36,7 +36,7 @@ USER root
COPY --chown=app:app function function
USER app

FROM build as ship
FROM build AS ship

ENV fprocess="python index.py"
ENV cgi_headers="true"
Expand Down
10 changes: 5 additions & 5 deletions template/python3-flask-debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PYTHON_VERSION=3.11
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-slim-buster as build
ARG PYTHON_VERSION=3.12
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 AS watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-slim-buster AS build

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
Expand Down Expand Up @@ -42,13 +42,13 @@ USER root

COPY --chown=app:app function/ .

FROM build as test
FROM build AS test
ARG TEST_COMMAND=tox
ARG TEST_ENABLED=true
RUN [ "$TEST_ENABLED" = "false" ] && echo "skipping tests" || eval "$TEST_COMMAND"


FROM build as ship
FROM build AS ship
WORKDIR /home/app/

#configure WSGI server and healthcheck
Expand Down
10 changes: 5 additions & 5 deletions template/python3-flask/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PYTHON_VERSION=3.11
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-alpine as build
ARG PYTHON_VERSION=3.12
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 AS watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-alpine AS build

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
Expand Down Expand Up @@ -41,12 +41,12 @@ USER root
COPY --chown=app:app function/ .


FROM build as test
FROM build AS test
ARG TEST_COMMAND=tox
ARG TEST_ENABLED=true
RUN [ "$TEST_ENABLED" = "false" ] && echo "skipping tests" || eval "$TEST_COMMAND"

FROM build as ship
FROM build AS ship
WORKDIR /home/app/

#configure WSGI server and healthcheck
Expand Down
10 changes: 5 additions & 5 deletions template/python3-http-debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PYTHON_VERSION=3.11
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-slim-buster as build
ARG PYTHON_VERSION=3.12
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 AS watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-slim-buster AS build

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
Expand Down Expand Up @@ -37,14 +37,14 @@ RUN pip install --no-cache-dir --user -r requirements.txt
USER root
COPY --chown=app:app function/ .

FROM build as test
FROM build AS test

ARG TEST_COMMAND=tox
ARG TEST_ENABLED=true
RUN [ "$TEST_ENABLED" = "false" ] && echo "skipping tests" || eval "$TEST_COMMAND"


FROM build as ship
FROM build AS ship
WORKDIR /home/app/

USER app
Expand Down
10 changes: 5 additions & 5 deletions template/python3-http/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PYTHON_VERSION=3.11
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-alpine as build
ARG PYTHON_VERSION=3.12
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 AS watchdog
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-alpine AS build

COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
Expand Down Expand Up @@ -38,12 +38,12 @@ RUN pip install --no-cache-dir --user -r requirements.txt
USER root
COPY --chown=app:app function/ .

FROM build as test
FROM build AS test
ARG TEST_COMMAND=tox
ARG TEST_ENABLED=true
RUN [ "$TEST_ENABLED" = "false" ] && echo "skipping tests" || eval "$TEST_COMMAND"

FROM build as ship
FROM build AS ship
WORKDIR /home/app/

# configure WSGI server and healthcheck
Expand Down

0 comments on commit eb5fb46

Please sign in to comment.