33
44# Build stage: Install python dependencies
55# ===
6- FROM ubuntu:jammy AS python-dependencies
7- RUN apt-get update && apt-get install --no-install-recommends --yes python3-pip python3-setuptools
6+ FROM ubuntu:noble AS python-dependencies
7+ RUN apt-get update && apt-get install --no-install-recommends --yes \
8+ python3-pip python3-setuptools python3-wheel python3-venv \
9+ build-essential git ca-certificates
810ADD requirements.txt /tmp/requirements.txt
911RUN pip3 config set global.disable-pip-version-check true
10- RUN --mount=type=cache,target=/root/.cache/pip pip3 install --user --requirement /tmp/requirements.txt
11-
12-
12+ RUN python3 -m venv /venv
13+ ENV PATH= "/venv/bin:${PATH}"
14+ RUN --mount=type=cache,target=/root/.cache/pip pip3 install --requirement /tmp/requirements.txt
1315# Build stage: Install yarn dependencies
1416# ===
1517FROM node:22 AS yarn-dependencies
@@ -31,17 +33,18 @@ RUN yarn run build
3133
3234# Build the production image
3335# ===
34- FROM ubuntu:jammy
36+ FROM ubuntu:noble
3537
3638# Set up environment
3739ENV LANG C.UTF-8
3840WORKDIR /srv
3941
4042# Install python and import python dependencies
41- RUN apt-get update && apt-get install --no-install-recommends --yes python3-setuptools python3-lib2to3 python3-pkg-resources
42- COPY --from=python-dependencies /root/.local/lib/python3.10/site-packages /root/.local/lib/python3.10/site-packages
43- COPY --from=python-dependencies /root/.local/bin /root/.local/bin
44- ENV PATH="/root/.local/bin:${PATH}"
43+ RUN apt-get update && apt-get install --no-install-recommends --yes \
44+ python3-setuptools python3-lib2to3 python3-pkg-resources \
45+ ca-certificates libsodium-dev gpg
46+ COPY --from=python-dependencies /venv /venv
47+ ENV PATH="/venv/bin:${PATH}"
4548
4649# Import code, build assets and mirror list
4750ADD . .
0 commit comments