What minor version does docker image python:3.12-slim use?
Any 3.12.X. The image tag is updated with each minor release.
How could it be that the pipeline is grabbing an older python version?
An old version of the image tag is cached on the machine. Because it exists, new version is not fetched. This is a configuration in gitlab-runner, see for example GitLab runner pulls image for every job .
If you intend to use 3.12.3, then the docker python project happens to also have :3.12.3-slim docker tag.
Answer from KamilCuk on Stack OverflowDocker Hub
hub.docker.com › _ › python
python - Official Image | Docker Hub
3.12.13-trixie · 3.11.15, 3.11: 3.11.15-trixie · 3.10.20, 3.10: 3.10.20-trixie · Where to file issues: https://github.com/docker-library/python/issues · Supported architectures: (more info) amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x, windows-amd64 · Published image artifact details: repo-info repo's repos/python/ directory (history) (image metadata, transfer size, etc) Image updates: official-images repo's library/python label official-images repo's library/python file (history) Source of this description: docs repo's python/ directory (history) Python is an interpreted, interactive, object-oriented, open-source programming language.
Docker
hub.docker.com › layers › library › python › 3.12 › images › sha256-280f63c69e2afdc7344d98269522eccd8c6168b8799e4d855dd07d820d4451d2
Image Layer Details - python:3.12
© 2026 Docker, Inc. All rights reserved. | Terms of Service | Subscription Service Agreement | Privacy | Legal
Docker
hub.docker.com › layers › library › python › 3.12.3 › images › sha256-77c32b256e160329f991028dfc16d980eca9832f83e6ce31e5f5a84a62313d10
Image Layer Details - python:3.12.3
© 2026 Docker, Inc. All rights reserved. | Terms of Service | Subscription Service Agreement | Privacy | Legal
Docker
hub.docker.com › layers › library › python › 3.12.2 › images › sha256-4db8a010e9675bd98b035b145d2a3500b464d325157684bbd04b57f2d820122e
Image Layer Details - python:3.12.2
© 2026 Docker, Inc. All rights reserved. | Terms of Service | Subscription Service Agreement | Privacy | Legal
GitHub
github.com › docker-library › python
GitHub - docker-library/python: Docker Official Image packaging for Python · GitHub
This is the Git repo of the Docker "Official Image" for python (not to be confused with any official python image provided by python upstream).
Starred by 2.7K users
Forked by 1.1K users
Languages Dockerfile 50.3% | Shell 49.7%
ECR Public Gallery
gallery.ecr.aws › docker › library › python
Amazon ECR Public Gallery - Docker/library/python
3.12.0-windowsservercore-1809, 3.12-windowsservercore-1809, 3-windowsservercore-1809, windowsservercore-1809 ... Supported architectures: (more info) amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x, windows-amd64 · Published image artifact details: repo-info repo's repos/python/ directory (history) (image metadata, transfer size, etc)
Docker
hub.docker.com › layers › library › python › 3.12.3-slim › images › sha256-fd3817f3a855f6c2ada16ac9468e5ee93e361005bd226fd5a5ee1a504e038c84
Image Layer Details - python:3.12.3-slim
© 2026 Docker, Inc. All rights reserved. | Terms of Service | Subscription Service Agreement | Privacy | Legal
Docker Hub
hub.docker.com › r › ubuntu › python
ubuntu/python - Docker Image
Current Python Docker Image from Canonical, based on Ubuntu. Receives security updates and rolls to newer Python or Ubuntu release.
Top answer 1 of 11
1
Are you referring to https://hub.docker.com/_/python? These are “Docker Official Images”, not official Python images. The images are provided by Docker Community, not by the PSF or Python community.
2 of 11
0
A while ago debian started to build python without using a libpython.
They claimed that that change made starting python faster.
May be that is the difference?
Otherwise it could be differences in compiler optimisation options used.
Docker
hub.docker.com › layers › library › python › 3.12.1-alpine › images › sha256-86d96a9eb1d966af0b231ae48e6628dfb640b85bbd41fea3940359f8da06fdad
Image Layer Details - python:3.12.1-alpine
© 2026 Docker, Inc. All rights reserved. | Terms of Service | Subscription Service Agreement | Privacy | Legal
Astral
docs.astral.sh › uv › guides › integration › docker
Using uv in Docker | uv
1 day ago - Use one of the above images with uv pre-installed or install uv by copying the binary from the official distroless Docker image: ... FROM python:3.12-slim-trixie # The installer requires curl (and certificates) to download the release archive RUN apt-get update && apt-get install -y ...
Stack Overflow
stackoverflow.com › questions › 77671355 › docker-image-python3-12-alpine-behaves-different-on-windows-and-debian
Docker image python:3.12-alpine behaves different on Windows and Debian - Stack Overflow
I have build my Fastapi project on my Windows machine and I can successfully run it and build the image. But when I want to run the project on a Raspberry Pi 4 with Debian 12 Bookworm with docker --version > v24.0.7 it fails while telling me that it cannot find a C compiler (gcc). It fails at the step where pip installs the packages from requirements.txt. ... FROM python:3.12-alpine LABEL authors="Raphael2b3" ADD requirements.txt ./ RUN pip install --upgrade pip RUN pip install -r requirements.txt RUN rm -f ./requirements.txt ADD .
Docker Hub
hub.docker.com › _ › python › tags
python Tags | Docker Hub
Docker Official Image python Tags page
CircleCI
circleci.com › developer › images › image › cimg › python
cimg/python - CircleCI
The browsers variant can be used by appending -browser to the end of an existing cimg/python tag. The browsers variant is designed to work in conjunction with the CircleCI Browser Tools orb. You can use the orb to install a version of Google Chrome and/or Firefox into your build. The image contains all of the supporting tools needed to use both the browser and its driver. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 orbs: browser-tools: circleci/browser-tools@1.1 jobs: build: docker: - image: cimg/python:3.7-browsers steps: - browser-tools/install-browser-tools - checkout - run: | python --version node --version java --version google-chrome --version
TestDriven.io
testdriven.io › blog › docker-best-practices
Docker Best Practices for Python Developers | TestDriven.io
February 12, 2024 - Multi-stage Docker builds allow you to break up your Dockerfiles into several stages. For example, you can have a stage for compiling and building your application, which can then be copied to subsequent stages. Since only the final stage is used to create the image, the dependencies and tools associated with building your application are discarded, leaving a lean and modular production-ready image. ... # temp stage FROM python:3.12.2-slim as builder WORKDIR /app ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 RUN apt-get update && \ apt-get install -y --no-install-recommends gcc COPY requirements.txt .
Amazon Web Services
docs.aws.amazon.com › aws lambda › developer guide › building lambda functions with python › deploy python lambda functions with container images
Deploy Python Lambda functions with container images - AWS Lambda
. When you deploy a container image to Lambda, Lambda automatically defines a default Linux user with least-privileged permissions. This is different from standard Docker behavior which defaults to the root user when no USER instruction is provided. FROM public.ecr.aws/lambda/python:3.12 # Copy requirements.txt COPY requirements.txt ${LAMBDA_TASK_ROOT} # Install the specified packages RUN pip install -r requirements.txt # Copy function code COPY lambda_function.py ${LAMBDA_TASK_ROOT} # Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile) CMD [ "lambda_function.handler" ]
Red Hat
catalog.redhat.com › en › software › containers › ubi8 › python-312 › 657c12cade3664622a12ed50
Python 3.12 - Red Hat Ecosystem Catalog
July 15, 2025 - To use the Source-to-Image scripts and build an image using a Dockerfile, create a Dockerfile with this content: FROM registry.fedoraproject.org/f33/python3 # Add application sources to a directory that the assemble script expects them # and set permissions so that the container runs without root access USER 0 ADD app-src /tmp/src RUN /usr/bin/fix-permissions /tmp/src USER 1001 # Install the dependencies RUN /usr/libexec/s2i/assemble # Set the default command for the resulting image CMD /usr/libexec/s2i/run
Docker
hub.docker.com › layers › library › python › 3.12.0-alpine › images › sha256-e6da250b6115b5627c8f6c5054fa1dcccdf7b8e56e003030606077300436542c
Image Layer Details - python:3.12.0-alpine
© 2026 Docker, Inc. All rights reserved. | Terms of Service | Subscription Service Agreement | Privacy | Legal