Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions examples/docker/aiohttp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
#
# docker build . -t your-repo/hello-bolt
#
FROM python:3.8.5-slim-buster as builder
FROM python:3.8-slim-bookworm as builder
RUN apt-get update && apt-get clean
COPY requirements.txt /build/
WORKDIR /build/
RUN pip install -U pip && pip install -r requirements.txt

FROM python:3.8.5-slim-buster as app
FROM python:3.8-slim-bookworm as app
# eMudhra 53119: refresh the OS trust store and fail the build unless the
# ca-certificates package carries the distrust fix for this Debian suite.
ARG CA_CERTIFICATES_REFRESH=2026-10-21
RUN set -eu; \
. /etc/os-release; \
case "$VERSION_CODENAME" in \
bookworm) min="20250419~deb12u2" ;; \
trixie) min="20250419+deb13u1" ;; \
*) echo "ca-certificates gate: no fixed package known for '$VERSION_CODENAME'" >&2; exit 1 ;; \
esac; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
v="$(dpkg-query -W -f='${Version}' ca-certificates)"; \
if dpkg --compare-versions "$v" ge "$min"; then \
echo "ca-certificates gate OK: $VERSION_CODENAME $v >= $min"; \
else \
echo "ca-certificates gate FAILED: $VERSION_CODENAME $v < $min" >&2; exit 1; \
fi
COPY --from=builder /build/ /app/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
WORKDIR /app/
Expand Down
16 changes: 14 additions & 2 deletions examples/docker/asgi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
#
# docker build . -t your-repo/hello-bolt
#
FROM python:3.11-alpine3.17 as builder
FROM python:3.11-alpine3.20 as builder
COPY requirements.txt /build/
WORKDIR /build/
RUN pip install -U pip && pip install -r requirements.txt

FROM python:3.11-alpine3.17 as app
FROM python:3.11-alpine3.20 as app
# eMudhra 53119: refresh the OS trust store and fail the build unless
# ca-certificates carries the distrust fix (>= 20261020-r0).
ARG CA_CERTIFICATES_REFRESH=2026-10-21
RUN set -eu; \
apk add --no-cache --upgrade ca-certificates ca-certificates-bundle; \
for p in ca-certificates ca-certificates-bundle; do \
v="$(apk info -e -v "$p" | sed "s/^$p-//")"; \
case "$(apk version -t "${v:-0}" 20261020-r0)" in \
"="|">") echo "ca-certificates gate OK: $p $v >= 20261020-r0" ;; \
*) echo "ca-certificates gate FAILED: $p ${v:-missing} < 20261020-r0" >&2; exit 1 ;; \
esac; \
done
WORKDIR /app/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
Expand Down
19 changes: 19 additions & 0 deletions examples/docker/fastapi-gunicorn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
# docker build . -t your-repo/hello-bolt
#
FROM tiangolo/uvicorn-gunicorn:python3.8-slim
# eMudhra 53119: refresh the OS trust store and fail the build unless the
# ca-certificates package carries the distrust fix for this Debian suite.
ARG CA_CERTIFICATES_REFRESH=2026-10-21
RUN set -eu; \
. /etc/os-release; \
case "$VERSION_CODENAME" in \
bookworm) min="20250419~deb12u2" ;; \
trixie) min="20250419+deb13u1" ;; \
*) echo "ca-certificates gate: no fixed package known for '$VERSION_CODENAME'" >&2; exit 1 ;; \
esac; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
v="$(dpkg-query -W -f='${Version}' ca-certificates)"; \
if dpkg --compare-versions "$v" ge "$min"; then \
echo "ca-certificates gate OK: $VERSION_CODENAME $v >= $min"; \
else \
echo "ca-certificates gate FAILED: $VERSION_CODENAME $v < $min" >&2; exit 1; \
fi
WORKDIR /app/
COPY *.py /app/
COPY requirements.txt /app/
Expand Down
23 changes: 21 additions & 2 deletions examples/docker/flask-gunicorn/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
#
# docker build . -t your-repo/hello-bolt
#
FROM python:3.8.5-slim-buster as builder
FROM python:3.8-slim-bookworm as builder
COPY requirements.txt /build/
WORKDIR /build/
RUN pip install -U pip && pip install -r requirements.txt

FROM python:3.8.5-slim-buster as app
FROM python:3.8-slim-bookworm as app
# eMudhra 53119: refresh the OS trust store and fail the build unless the
# ca-certificates package carries the distrust fix for this Debian suite.
ARG CA_CERTIFICATES_REFRESH=2026-10-21
RUN set -eu; \
. /etc/os-release; \
case "$VERSION_CODENAME" in \
bookworm) min="20250419~deb12u2" ;; \
trixie) min="20250419+deb13u1" ;; \
*) echo "ca-certificates gate: no fixed package known for '$VERSION_CODENAME'" >&2; exit 1 ;; \
esac; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
v="$(dpkg-query -W -f='${Version}' ca-certificates)"; \
if dpkg --compare-versions "$v" ge "$min"; then \
echo "ca-certificates gate OK: $VERSION_CODENAME $v >= $min"; \
else \
echo "ca-certificates gate FAILED: $VERSION_CODENAME $v < $min" >&2; exit 1; \
fi
WORKDIR /app/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
Expand Down
25 changes: 22 additions & 3 deletions examples/docker/flask-uwsgi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
#
# docker build . -t your-repo/hello-bolt
#
FROM python:3.8.5-slim-buster as builder
FROM python:3.8-slim-bookworm as builder
RUN apt-get update \
&& apt-get -y install build-essential libpcre3-dev \
&& apt-get -y install build-essential libpcre2-dev \
&& apt-get clean
COPY requirements.txt /build/
WORKDIR /build/
RUN pip install -U pip && pip install -r requirements.txt

FROM python:3.8.5-slim-buster as app
FROM python:3.8-slim-bookworm as app
# eMudhra 53119: refresh the OS trust store and fail the build unless the
# ca-certificates package carries the distrust fix for this Debian suite.
ARG CA_CERTIFICATES_REFRESH=2026-10-21
RUN set -eu; \
. /etc/os-release; \
case "$VERSION_CODENAME" in \
bookworm) min="20250419~deb12u2" ;; \
trixie) min="20250419+deb13u1" ;; \
*) echo "ca-certificates gate: no fixed package known for '$VERSION_CODENAME'" >&2; exit 1 ;; \
esac; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
v="$(dpkg-query -W -f='${Version}' ca-certificates)"; \
if dpkg --compare-versions "$v" ge "$min"; then \
echo "ca-certificates gate OK: $VERSION_CODENAME $v >= $min"; \
else \
echo "ca-certificates gate FAILED: $VERSION_CODENAME $v < $min" >&2; exit 1; \
fi
WORKDIR /app/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
Expand Down
23 changes: 21 additions & 2 deletions examples/docker/sanic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
#
# docker build . -t your-repo/hello-bolt
#
FROM python:3.8.5-slim-buster as builder
FROM python:3.8-slim-bookworm as builder
COPY requirements.txt /build/
WORKDIR /build/
RUN pip install -U pip && pip install -r requirements.txt

FROM python:3.8.5-slim-buster as app
FROM python:3.8-slim-bookworm as app
# eMudhra 53119: refresh the OS trust store and fail the build unless the
# ca-certificates package carries the distrust fix for this Debian suite.
ARG CA_CERTIFICATES_REFRESH=2026-10-21
RUN set -eu; \
. /etc/os-release; \
case "$VERSION_CODENAME" in \
bookworm) min="20250419~deb12u2" ;; \
trixie) min="20250419+deb13u1" ;; \
*) echo "ca-certificates gate: no fixed package known for '$VERSION_CODENAME'" >&2; exit 1 ;; \
esac; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
v="$(dpkg-query -W -f='${Version}' ca-certificates)"; \
if dpkg --compare-versions "$v" ge "$min"; then \
echo "ca-certificates gate OK: $VERSION_CODENAME $v >= $min"; \
else \
echo "ca-certificates gate FAILED: $VERSION_CODENAME $v < $min" >&2; exit 1; \
fi
WORKDIR /app/
COPY *.py /app/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
Expand Down
22 changes: 21 additions & 1 deletion examples/google_cloud_run/aiohttp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,27 @@
# ----------------------------------------------
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.8.5-slim-buster
FROM python:3.8-slim-bookworm

# eMudhra 53119: refresh the OS trust store and fail the build unless the
# ca-certificates package carries the distrust fix for this Debian suite.
ARG CA_CERTIFICATES_REFRESH=2026-10-21
RUN set -eu; \
. /etc/os-release; \
case "$VERSION_CODENAME" in \
bookworm) min="20250419~deb12u2" ;; \
trixie) min="20250419+deb13u1" ;; \
*) echo "ca-certificates gate: no fixed package known for '$VERSION_CODENAME'" >&2; exit 1 ;; \
esac; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
v="$(dpkg-query -W -f='${Version}' ca-certificates)"; \
if dpkg --compare-versions "$v" ge "$min"; then \
echo "ca-certificates gate OK: $VERSION_CODENAME $v >= $min"; \
else \
echo "ca-certificates gate FAILED: $VERSION_CODENAME $v < $min" >&2; exit 1; \
fi

# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
Expand Down
22 changes: 21 additions & 1 deletion examples/google_cloud_run/flask-gunicorn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,27 @@
# ----------------------------------------------
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.8.5-slim-buster
FROM python:3.8-slim-bookworm

# eMudhra 53119: refresh the OS trust store and fail the build unless the
# ca-certificates package carries the distrust fix for this Debian suite.
ARG CA_CERTIFICATES_REFRESH=2026-10-21
RUN set -eu; \
. /etc/os-release; \
case "$VERSION_CODENAME" in \
bookworm) min="20250419~deb12u2" ;; \
trixie) min="20250419+deb13u1" ;; \
*) echo "ca-certificates gate: no fixed package known for '$VERSION_CODENAME'" >&2; exit 1 ;; \
esac; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
v="$(dpkg-query -W -f='${Version}' ca-certificates)"; \
if dpkg --compare-versions "$v" ge "$min"; then \
echo "ca-certificates gate OK: $VERSION_CODENAME $v >= $min"; \
else \
echo "ca-certificates gate FAILED: $VERSION_CODENAME $v < $min" >&2; exit 1; \
fi

# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
Expand Down
22 changes: 21 additions & 1 deletion examples/google_cloud_run/sanic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,27 @@
# ----------------------------------------------
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.8.5-slim-buster
FROM python:3.8-slim-bookworm

# eMudhra 53119: refresh the OS trust store and fail the build unless the
# ca-certificates package carries the distrust fix for this Debian suite.
ARG CA_CERTIFICATES_REFRESH=2026-10-21
RUN set -eu; \
. /etc/os-release; \
case "$VERSION_CODENAME" in \
bookworm) min="20250419~deb12u2" ;; \
trixie) min="20250419+deb13u1" ;; \
*) echo "ca-certificates gate: no fixed package known for '$VERSION_CODENAME'" >&2; exit 1 ;; \
esac; \
apt-get update; \
apt-get install -y --no-install-recommends ca-certificates; \
rm -rf /var/lib/apt/lists/*; \
v="$(dpkg-query -W -f='${Version}' ca-certificates)"; \
if dpkg --compare-versions "$v" ge "$min"; then \
echo "ca-certificates gate OK: $VERSION_CODENAME $v >= $min"; \
else \
echo "ca-certificates gate FAILED: $VERSION_CODENAME $v < $min" >&2; exit 1; \
fi

# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
Expand Down