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 Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.4

# ---- Build stage ----
FROM python:3.10-slim AS builder
FROM python:3.13.5-slim AS builder
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

Upgrading the base image from Python 3.10 to 3.13.5 introduces a significant stability risk. Python 3.13 is a pre-release version and not recommended for production workloads. Using a non-stable base image can lead to unexpected build failures, dependency incompatibilities, and subtle bugs due to breaking changes in the language or standard library.

While fixing security vulnerabilities is important, it's crucial to balance it with application stability. A more prudent approach is to upgrade to the latest stable Python version, which is currently Python 3.12. This will likely resolve many vulnerabilities while providing a stable foundation.

I strongly recommend using a stable Python version. Please consider testing with python:3.12-slim instead.

FROM python:3.12-slim AS builder

WORKDIR /app

# System deps for building wheels, psycopg2, etc.
Expand All @@ -12,7 +12,7 @@ COPY requirements-dev.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt

# ---- Production image ----
FROM python:3.10-slim
FROM python:3.13.5-slim
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

As with the builder stage, using a pre-release Python version for the final production image poses a critical risk to the application's stability and reliability. Production environments should always use stable, officially released versions of language runtimes.

Upgrading to python:3.13.5-slim could introduce difficult-to-diagnose runtime issues. It is much safer to upgrade to the latest stable version, such as python:3.12-slim, and perform thorough testing. This approach provides a good balance between security and stability.

Please change this to a stable Python release.

FROM python:3.12-slim


ENV PYTHONUNBUFFERED=1
WORKDIR /app
Expand Down
Loading