File tree 9 files changed +66
-8
lines changed
9 files changed +66
-8
lines changed Original file line number Diff line number Diff line change 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
2
2
FROM --platform=${TARGETPLATFORM:-linux/amd64} oven/bun:1.0-alpine as ship
3
3
4
4
ARG TARGETPLATFORM
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ COPY . /home/app/
27
27
28
28
RUN gradle build
29
29
30
- FROM ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
30
+ FROM ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
31
31
FROM openjdk:11-jre-slim as ship
32
32
33
33
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ COPY . /home/app/
28
28
RUN gradle build
29
29
RUN find .
30
30
31
- FROM ghcr.io/openfaas/of-watchdog:0.10.1 as watchdog
31
+ FROM ghcr.io/openfaas/of-watchdog:0.10.4 as watchdog
32
32
33
33
FROM openjdk:11-jre-slim as ship
34
34
RUN apt-get update -qqy \
Original file line number Diff line number Diff line change 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
2
2
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:14-alpine as ship
3
3
4
4
ARG TARGETPLATFORM
Original file line number Diff line number Diff line change 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
2
2
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:16-alpine as ship
3
3
4
4
ARG TARGETPLATFORM
Original file line number Diff line number Diff line change 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
2
2
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:17-alpine as ship
3
3
4
4
ARG TARGETPLATFORM
Original file line number Diff line number Diff line change 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
2
2
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:18-alpine as ship
3
3
4
4
ARG TARGETPLATFORM
Original file line number Diff line number Diff line change 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
2
2
FROM --platform=${TARGETPLATFORM:-linux/amd64} node:20-alpine as ship
3
3
4
4
ARG TARGETPLATFORM
Original file line number Diff line number Diff line change
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" ]
You can’t perform that action at this time.
0 commit comments