Skip to content

Commit ea77aff

Browse files
committed
Add Docker build cache mounts for apt operations to improve build performance
1 parent 7b573ab commit ea77aff

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Added Docker Compose healthchecks for PostgreSQL, Redis, and Vite services to ensure reliable service startup
1010
* Added Docker build cache mounts for pip, uv, and npm with project-specific IDs to speed up builds
1111
* Added .claude/ to .gitignore for local Claude Code settings
12+
* Added Docker build cache mounts for apt update and install operations
1213

1314
### Changed
1415

config/docker/Dockerfile.web

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ FROM python:3.13-slim-bookworm AS dev
3838
# Set the locale
3939
# libxml2-dev is needed for uwsgi in the production stage
4040
# mime-support install (/etc/mime.types) which is needded uWSGI to server static files with the correct mime types
41-
RUN apt-get update \
42-
&& apt-get install -y locales libxml2-dev mime-support \
41+
RUN --mount=type=cache,target=/var/cache/apt,id=django-base-site-apt \
42+
--mount=type=cache,target=/var/lib/apt,id=django-base-site-apt \
43+
apt update \
44+
&& apt install -yqq --no-install-recommends locales libxml2-dev mime-support \
4345
&& echo "LC_ALL=en_US.UTF-8" >> /etc/environment \
4446
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
4547
&& echo "LANG=en_US.UTF-8" > /etc/locale.conf \

0 commit comments

Comments
 (0)