File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
ARG PYTHON_VERSION=3.12
2
2
ARG DEBIAN_OS=slim-bookworm
3
+ ARG UPGRADE_PACKAGES=false
4
+
3
5
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 AS watchdog
4
6
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-${DEBIAN_OS} AS build
5
7
@@ -9,8 +11,9 @@ RUN chmod +x /usr/bin/fwatchdog
9
11
ARG ADDITIONAL_PACKAGE
10
12
# Alternatively use ADD https:// (which will not be cached by Docker builder)
11
13
12
- RUN apt-get -qy update \
13
- && apt-get -qy install gcc make ${ADDITIONAL_PACKAGE} \
14
+ RUN apt-get update -qy \
15
+ && if [ "${UPGRADE_PACKAGES}" = "true" ] || [ "${UPGRADE_PACKAGES}" = "1" ]; then apt-get upgrade -qy; fi \
16
+ && apt-get install -qy --no-install-recommends gcc make ${ADDITIONAL_PACKAGE} \
14
17
&& rm -rf /var/lib/apt/lists/*
15
18
16
19
# Add non root user
Original file line number Diff line number Diff line change 1
1
ARG PYTHON_VERSION=3.12
2
2
ARG DEBIAN_OS=slim-bookworm
3
+
4
+
3
5
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 AS watchdog
4
6
FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-${DEBIAN_OS} AS build
5
7
@@ -8,9 +10,11 @@ RUN chmod +x /usr/bin/fwatchdog
8
10
9
11
ARG ADDITIONAL_PACKAGE
10
12
# Alternatively use ADD https:// (which will not be cached by Docker builder)
13
+ ARG UPGRADE_PACKAGES=false
11
14
12
- RUN apt-get -qy update \
13
- && apt-get -qy install ${ADDITIONAL_PACKAGE} \
15
+ RUN apt-get update -qy \
16
+ && if [ "${UPGRADE_PACKAGES}" = "true" ] || [ "${UPGRADE_PACKAGES}" = "1" ]; then apt-get upgrade -qy; fi \
17
+ && apt-get install -qy --no-install-recommends gcc make ${ADDITIONAL_PACKAGE} \
14
18
&& rm -rf /var/lib/apt/lists/*
15
19
16
20
# Add non root user
You can’t perform that action at this time.
0 commit comments