Skip to content

Commit 54ac34e

Browse files
authored
Update Docker images to Debian 13 (Trixie) (mozilla#4142)
- `apt-transport-https`: looks like this is unnecessary, modern apt supports HTTPS natively - `postgresql-server-dev-15` → `libpq-dev`. This is only needed to build `psycopg2`. Trixie ships with PG17, clients are backward compatible. - `libmemcached11` → `libmemcached11t64`, because of the [64-bit time_t transition](https://dietpi.com/blog/?p=4014#other-changes)
1 parent 80a4b95 commit 54ac34e

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

docker/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.13-bookworm AS server
1+
FROM python:3.13-trixie AS server
22

33
ARG USER_ID=1000
44
ARG GROUP_ID=1000
@@ -13,8 +13,6 @@ ENV PYTHONPATH /app
1313

1414
# Install required software.
1515
RUN apt-get update \
16-
# Enable downloading packages over https
17-
&& apt-get install -y apt-transport-https \
1816
# Add NodeSource v24.x and install nodejs
1917
&& curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
2018
# Install software
@@ -24,7 +22,8 @@ RUN apt-get update \
2422
libmemcached-dev \
2523
nodejs \
2624
postgresql-client \
27-
postgresql-server-dev-15 \
25+
# required to build psycopg2
26+
libpq-dev \
2827
# Clean up what can be cleaned up.
2928
&& apt-get autoremove -y
3029

docker/Dockerfile-mozcloud

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Stage 1: Python dependencies builder
2-
FROM python:3.13-bookworm AS python-builder
2+
FROM python:3.13-trixie AS python-builder
33

44
ENV DEBIAN_FRONTEND=noninteractive
55

@@ -8,7 +8,8 @@ RUN apt-get update \
88
&& apt-get install -y --no-install-recommends \
99
build-essential \
1010
libmemcached-dev \
11-
postgresql-server-dev-15 \
11+
# required to build psycopg2
12+
libpq-dev \
1213
&& rm -rf /var/lib/apt/lists/*
1314

1415
# Install uv (version should match the one used in Python GitHub workflows)
@@ -27,7 +28,7 @@ RUN uv pip install -r requirements/default.txt
2728

2829

2930
# Stage 2: Node.js frontend builder
30-
FROM node:24-bookworm-slim AS node-builder
31+
FROM node:24-trixie-slim AS node-builder
3132

3233
WORKDIR /app
3334

@@ -49,7 +50,7 @@ RUN npm run build:prod
4950

5051

5152
# Stage 3: Static files builder
52-
FROM python:3.13-slim-bookworm AS static-builder
53+
FROM python:3.13-slim-trixie AS static-builder
5354

5455
# SECRET_KEY and DATABASE_URL are set only to prevent collectstatic from
5556
# failing—their actual values don’t matter. collectstatic loads settings/base.py,
@@ -65,8 +66,6 @@ ENV PYTHONPATH=/app
6566

6667
# Install Node.js for building frontend
6768
RUN apt-get update \
68-
# Enable downloading packages over https
69-
&& apt-get install -y apt-transport-https \
7069
# Add NodeSource v24.x and install nodejs
7170
&& curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
7271
# Install software
@@ -107,7 +106,7 @@ RUN echo "${GIT_REVISION}" > static/revision.txt
107106

108107

109108
# Stage 4: Final runtime image
110-
FROM python:3.13-slim-bookworm AS server
109+
FROM python:3.13-slim-trixie AS server
111110

112111
ARG USER_ID=1000
113112
ARG GROUP_ID=1000
@@ -124,7 +123,7 @@ ENV PYTHONPATH=/app
124123
RUN apt-get update \
125124
&& apt-get install -y --no-install-recommends \
126125
git \
127-
libmemcached11 \
126+
libmemcached11t64 \
128127
libpq5 \
129128
mercurial \
130129
openssh-client \

0 commit comments

Comments
 (0)