1- FROM ubuntu:22 .04
1+ FROM ubuntu:24 .04
22
33ENV DEBIAN_FRONTEND noninteractive
44ENV LANG en_US.UTF-8
@@ -24,23 +24,26 @@ RUN apt-get -y install \
2424 libfreetype6 \
2525 libjpeg-dev \
2626 sqlite \
27- netcat \
27+ netcat-openbsd \
2828 telnet \
2929 lsb-release
3030
31+ # Install uv for fast package management
32+ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
33+ ENV PATH="/root/.cargo/bin:${PATH}"
34+
3135# Requirements are installed here to ensure they will be cached.
3236# https://docs.docker.com/build/cache/#use-the-dedicated-run-cache
3337COPY ./requirements /requirements
34- RUN pip install --upgrade pip
35- RUN --mount=type=cache,target=/root/.cache/pip pip install -r /requirements/development.txt
36- RUN --mount=type=cache,target=/root/.cache/pip pip install -r /requirements/production.txt
38+ RUN --mount=type=cache,target=/root/.cache/uv uv pip install --system -r /requirements/development.txt
39+ RUN --mount=type=cache,target=/root/.cache/uv uv pip install --system -r /requirements/production.txt
3740
3841# Comment this if you don't need the page/topic analyzer.
3942# The analyzer is used to target ads better based on page content.
4043# Its requirements are huge and include PyTorch and other ML tools.
4144# If not needed, make sure to set `ADSERVER_ANALYZER_BACKEND=` (empty string)
4245# in your environment file `./envs/local/django`.
43- RUN --mount=type=cache,target=/root/.cache/pip pip install -r /requirements/analyzer.txt
46+ RUN --mount=type=cache,target=/root/.cache/uv uv pip install --system -r /requirements/analyzer.txt
4447
4548COPY ./docker-compose/django/start /start
4649RUN chmod +x /start
0 commit comments