Skip to content
Merged
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
8 changes: 6 additions & 2 deletions examples/docker/aiohttp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#
# 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
# Refresh the OS trust store so the image gets the latest ca-certificates.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/ /app/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
WORKDIR /app/
Expand Down
6 changes: 4 additions & 2 deletions examples/docker/asgi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#
# 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
# Refresh the OS trust store so the image gets the latest ca-certificates.
RUN apk add --no-cache --upgrade ca-certificates ca-certificates-bundle
WORKDIR /app/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
Expand Down
4 changes: 4 additions & 0 deletions examples/docker/fastapi-gunicorn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# docker build . -t your-repo/hello-bolt
#
FROM tiangolo/uvicorn-gunicorn:python3.8-slim
# Refresh the OS trust store so the image gets the latest ca-certificates.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app/
COPY *.py /app/
COPY requirements.txt /app/
Expand Down
8 changes: 6 additions & 2 deletions examples/docker/flask-gunicorn/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#
# 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
# Refresh the OS trust store so the image gets the latest ca-certificates.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
Expand Down
10 changes: 7 additions & 3 deletions examples/docker/flask-uwsgi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#
# 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
# Refresh the OS trust store so the image gets the latest ca-certificates.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/
Expand Down
8 changes: 6 additions & 2 deletions examples/docker/sanic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#
# 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
# Refresh the OS trust store so the image gets the latest ca-certificates.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app/
COPY *.py /app/
COPY --from=builder /usr/local/bin/ /usr/local/bin/
Expand Down
7 changes: 6 additions & 1 deletion examples/google_cloud_run/aiohttp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
# ----------------------------------------------
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.8.5-slim-buster
FROM python:3.8-slim-bookworm

# Refresh the OS trust store so the image gets the latest ca-certificates.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
Expand Down
7 changes: 6 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,12 @@
# ----------------------------------------------
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.8.5-slim-buster
FROM python:3.8-slim-bookworm

# Refresh the OS trust store so the image gets the latest ca-certificates.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*

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

# Refresh the OS trust store so the image gets the latest ca-certificates.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*

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