Skip to content

Commit 2bf8850

Browse files
committed
Update of-watchdog to 0.10.4
Includes optional X-Timeout header and better streamed responses support, without buffering into memory first. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent fd09fa7 commit 2bf8850

File tree

9 files changed

+66
-8
lines changed

9 files changed

+66
-8
lines changed

template/bun/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
1+
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
22
FROM --platform=${TARGETPLATFORM:-linux/amd64} oven/bun:1.0-alpine as ship
33

44
ARG TARGETPLATFORM

template/java11-vert-x/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ COPY . /home/app/
2727

2828
RUN gradle build
2929

30-
FROM ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
30+
FROM ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
3131
FROM openjdk:11-jre-slim as ship
3232

3333
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog

template/java11/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COPY . /home/app/
2828
RUN gradle build
2929
RUN find .
3030

31-
FROM ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
31+
FROM ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
3232

3333
FROM openjdk:11-jre-slim as ship
3434
RUN apt-get update -qqy \

template/node14/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
1+
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
22
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:14-alpine as ship
33

44
ARG TARGETPLATFORM

template/node16/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
1+
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
22
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:16-alpine as ship
33

44
ARG TARGETPLATFORM

template/node17/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
1+
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
22
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:17-alpine as ship
33

44
ARG TARGETPLATFORM

template/node18/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
1+
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
22
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:18-alpine as ship
33

44
ARG TARGETPLATFORM

template/node20/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
1+
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
22
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:20-alpine as ship
33

44
ARG TARGETPLATFORM

template/python3-streaming/Dockerfile

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
ARG PYTHON_VERSION=3
2+
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
3+
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-alpine
4+
5+
ARG TARGETPLATFORM
6+
ARG BUILDPLATFORM
7+
8+
# Allows you to add additional packages via build-arg
9+
ARG ADDITIONAL_PACKAGE
10+
11+
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
12+
RUN chmod +x /usr/bin/fwatchdog
13+
RUN apk --no-cache add ca-certificates ${ADDITIONAL_PACKAGE}
14+
15+
16+
# Add non root user
17+
RUN addgroup -S app && adduser app -S -G app
18+
19+
WORKDIR /home/app/
20+
21+
COPY index.py .
22+
COPY requirements.txt .
23+
24+
RUN chown -R app /home/app && \
25+
mkdir -p /home/app/python && chown -R app /home/app
26+
USER app
27+
ENV PATH=$PATH:/home/app/.local/bin:/home/app/python/bin/
28+
ENV PYTHONPATH=$PYTHONPATH:/home/app/python
29+
30+
RUN pip install -r requirements.txt --target=/home/app/python
31+
32+
RUN mkdir -p function
33+
RUN touch ./function/__init__.py
34+
35+
WORKDIR /home/app/function/
36+
COPY function/requirements.txt .
37+
38+
RUN pip install -r requirements.txt --target=/home/app/python
39+
40+
WORKDIR /home/app/
41+
42+
USER root
43+
44+
COPY function function
45+
46+
# Allow any user-id for OpenShift users.
47+
RUN chown -R app:app ./ && \
48+
chmod -R 777 /home/app/python
49+
50+
USER app
51+
52+
ENV fprocess="python3 index.py"
53+
ENV mode="streaming"
54+
EXPOSE 8080
55+
56+
HEALTHCHECK --interval=3s CMD [ -e /tmp/.lock ] || exit 1
57+
58+
CMD ["fwatchdog"]

0 commit comments

Comments
 (0)