codex-python is a Python-focused Docker development environment that provides a comprehensive Python development setup with multiple Python version support.
This repository is derived from the OpenAI codex-universal base image and has been adapted to focus specifically on Python development with configurable Python versions (3.10, 3.11, 3.12, 3.13).
The Docker image is available at:
docker pull ghcr.io/s2005/codex-python:3.12You can also use version-specific tags:
# Python 3.12 (default)
docker pull ghcr.io/s2005/codex-python:3.12
# Other Python versions
docker pull ghcr.io/s2005/codex-python:3.10
docker pull ghcr.io/s2005/codex-python:3.11
docker pull ghcr.io/s2005/codex-python:3.13The below script shows how you can set up the Python development environment:
# This script mounts the current directory similar to how it would get cloned in.
docker run --rm -it \
-v $(pwd):/workspace/$(basename $(pwd)) -w /workspace/$(basename $(pwd)) \
ghcr.io/s2005/codex-python:3.12codex-python provides a comprehensive Python development environment with multiple Python versions and essential development tools.
The workflow allows building images with different Python versions:
Via GitHub Actions (Recommended):
- Go to Actions → "Build Python Image" → "Run workflow"
- Select your desired Python version: 3.10, 3.11, 3.12, or 3.13
- The image will be tagged as
ghcr.io/{owner}/codex-python:{version}
Via Manual Build:
# Build with specific Python version
docker build --build-arg PYTHON_VERSION=3.11 -t codex-python:3.11 .
# Build with multiple Python versions enabled (requires external repository access)
docker build --build-arg ENABLE_MULTI_PYTHON=true -t codex-python:multi .
# Default build (Python 3.12 only, works in restricted networks)
docker build -t codex-python:3.12 .Switching Python versions (when multi-version is enabled):
# Inside the container
switch-python 3.11
switch-python 3.10
switch-python 3.13Supported Python versions: 3.10, 3.11, 3.12, 3.13
The environment comes with Python 3.12 by default. When built with ENABLE_MULTI_PYTHON=true, additional Python versions (3.10, 3.11, 3.13) are also available.
# Check current Python version
python --version
# Switch Python versions (when multi-version is enabled)
switch-python 3.11
switch-python 3.10
switch-python 3.13
# Use version-specific commands directly
python3.10 --version # (if available)
python3.11 --version # (if available)
python3.12 --version # (always available)
python3.13 --version # (if available)The image includes pip and pipx for installing Python packages and tools:
# Install development tools globally via pipx (recommended)
pipx install poetry # Python dependency management
pipx install uv # Fast Python package installer
pipx install black # Code formatter
pipx install ruff # Fast Python linter
# Install development tools per project via pip
pip install mypy pyright isort flake8The environment includes:
- Python: Python 3.12 (default) with optional multi-version support (3.10, 3.11, 3.12, 3.13) via build argument
- Python tools:
pip,pipx,python3-venv(additional tools like poetry, uv, ruff, black, mypy, pyright, isort can be installed via pip/pipx) - Development tools:
git,git-lfs,ripgrep, and essential build tools - Base system: Ubuntu 24.04 with development libraries
See Dockerfile for the full details of installed packages.
This project is licensed under the MIT License. See the LICENSE file for details.
The Docker image incorporates various open source components with different licenses (MIT, Apache-2.0, BSD, GPL, etc.). For complete license information and Software Bill of Materials (SBOM), see:
- LICENSE - Full license text and component details
- SBOM (Markdown) - Human-readable component list
- SBOM (SPDX) - Machine-readable SPDX format
This project is based on the OpenAI codex-universal Docker image. We've adapted it to focus specifically on Python development with enhanced version flexibility and streamlined workflows.