Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions services/arms/judge/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
# Judge Arm Dockerfile - Multi-stage build for Python service
FROM python:3.13.7-slim as builder
FROM python:3.14.1-slim as builder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This version upgrade will break the Docker build. The COPY instruction on line 41 uses a hardcoded path with the old Python version (3.13) for both the source (from this builder stage) and the destination (in the runtime stage defined on line 26).

# services/arms/judge/Dockerfile:41
COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages

With the base images updated to python:3.14.1-slim, the site-packages directory will be at /usr/local/lib/python3.14/site-packages. The COPY instruction will fail because the source path /usr/local/lib/python3.13/site-packages will not exist in the builder stage.

To fix this, the version number in the path on line 41 must be updated to 3.14 for both source and destination.

A better long-term solution would be to use an ARG for the Python version to avoid this kind of issue in the future. For example:

ARG PYTHON_VERSION_SHORT=3.14
ARG PYTHON_VERSION_FULL=3.14.1
FROM python:${PYTHON_VERSION_FULL}-slim as builder
...
COPY --from=builder /usr/local/lib/python${PYTHON_VERSION_SHORT}/site-packages /usr/local/lib/python${PYTHON_VERSION_SHORT}/site-packages

This way, you only need to update the ARGs at the top of the file.


# Install system dependencies
RUN apt-get update && apt-get install -y \
Expand All @@ -23,7 +23,7 @@ RUN poetry config virtualenvs.create false && \
poetry install --only main --no-interaction --no-ansi

# Runtime stage
FROM python:3.13.7-slim
FROM python:3.14.1-slim

# Install runtime dependencies
RUN apt-get update && apt-get install -y \
Expand Down
Loading