|
| 1 | +# Set variables reused in Dockerfile |
| 2 | +ARG PYTHON_IMAGE_VERSION=3.13.2-slim-bookworm |
| 3 | + |
1 | 4 | # First things first, we build an image which is where we're going to compile |
2 | 5 | # our static assets with. We use this stage in development. |
3 | 6 | FROM node:24.0.0-bookworm AS static-deps |
@@ -38,7 +41,7 @@ RUN NODE_ENV=production npm run build |
38 | 41 |
|
39 | 42 |
|
40 | 43 | # We'll build a light-weight layer along the way with just docs stuff |
41 | | -FROM python:3.13.2-slim-bookworm AS docs |
| 44 | +FROM python:${PYTHON_IMAGE_VERSION} AS docs |
42 | 45 |
|
43 | 46 | # By default, Docker has special steps to avoid keeping APT caches in the layers, which |
44 | 47 | # is good, but in our case, we're going to mount a special cache volume (kept between |
@@ -105,7 +108,7 @@ USER docs |
105 | 108 |
|
106 | 109 | # Now we're going to build our actual application, but not the actual production |
107 | 110 | # image that it gets deployed into. |
108 | | -FROM python:3.13.2-slim-bookworm AS build |
| 111 | +FROM python:${PYTHON_IMAGE_VERSION} AS build |
109 | 112 |
|
110 | 113 | # Define whether we're building a production or a development image. This will |
111 | 114 | # generally be used to control whether or not we install our development and |
@@ -187,7 +190,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ |
187 | 190 |
|
188 | 191 | # Now we're going to build our actual application image, which will eventually |
189 | 192 | # pull in the static files that were built above. |
190 | | -FROM python:3.13.2-slim-bookworm |
| 193 | +FROM python:${PYTHON_IMAGE_VERSION} |
191 | 194 |
|
192 | 195 | # Setup some basic environment variables that are ~never going to change. |
193 | 196 | ENV PYTHONUNBUFFERED 1 |
|
0 commit comments