File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 11ARG PYTHON_VERSION=3.12
22ARG DEBIAN_OS=slim-bookworm
3+ ARG UPGRADE_PACKAGES=false
4+
35FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 AS watchdog
46FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-${DEBIAN_OS} AS build
57
@@ -9,8 +11,9 @@ RUN chmod +x /usr/bin/fwatchdog
911ARG ADDITIONAL_PACKAGE
1012# Alternatively use ADD https:// (which will not be cached by Docker builder)
1113
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} \
1417 && rm -rf /var/lib/apt/lists/*
1518
1619# Add non root user
Original file line number Diff line number Diff line change 11ARG PYTHON_VERSION=3.12
22ARG DEBIAN_OS=slim-bookworm
3+
4+
35FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.10.4 AS watchdog
46FROM --platform=${TARGETPLATFORM:-linux/amd64} python:${PYTHON_VERSION}-${DEBIAN_OS} AS build
57
@@ -8,9 +10,11 @@ RUN chmod +x /usr/bin/fwatchdog
810
911ARG ADDITIONAL_PACKAGE
1012# Alternatively use ADD https:// (which will not be cached by Docker builder)
13+ ARG UPGRADE_PACKAGES=false
1114
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} \
1418 && rm -rf /var/lib/apt/lists/*
1519
1620# Add non root user
You can’t perform that action at this time.
0 commit comments