https://github.com/openai/codex-universal
Base docker image used in Codex environments
https://github.com/openai/codex-universal
Last synced: 5 months ago
JSON representation
Base docker image used in Codex environments
- Host: GitHub
- URL: https://github.com/openai/codex-universal
- Owner: openai
- Created: 2025-05-11T05:20:12.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-05-28T03:10:36.000Z (5 months ago)
- Last Synced: 2025-06-11T19:35:34.473Z (5 months ago)
- Language: Dockerfile
- Size: 16.6 KB
- Stars: 411
- Watchers: 6
- Forks: 84
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- License: LICENSES/LICENSE
Awesome Lists containing this project
- awesome-codex-cli - codex-universal - Base docker image used in Codex environments (Tools / setup tool)
README
# codex-universal
`codex-universal` is a reference implementation of the base Docker image available in [OpenAI Codex](http://platform.openai.com/docs/codex).
This repository is intended to help developers cutomize environments in Codex, by providing a similar image that can be pulled and run locally. This is not an identical environment but should help for debugging and development.
For more details on environment setup, see [OpenAI Codex](http://platform.openai.com/docs/codex).
## Usage
The Docker image is available at:
```
docker pull ghcr.io/openai/codex-universal:latest
```
The below script shows how can you approximate the `setup` environment in Codex:
```sh
# See below for environment variable options.
# This script mounts the current directory similar to how it would get cloned in.
docker run --rm -it \
-e CODEX_ENV_PYTHON_VERSION=3.12 \
-e CODEX_ENV_NODE_VERSION=20 \
-e CODEX_ENV_RUST_VERSION=1.87.0 \
-e CODEX_ENV_GO_VERSION=1.23.8 \
-e CODEX_ENV_SWIFT_VERSION=6.1 \
-v $(pwd):/workspace/$(basename $(pwd)) -w /workspace/$(basename $(pwd)) \
ghcr.io/openai/codex-universal:latest
```
`codex-universal` includes setup scripts that look for `CODEX_ENV_*` environment variables and configures the language version accordingly.
### Configuring language runtimes
The following environment variables can be set to configure runtime installation. Note that a limited subset of versions are supported (indicated in the table below):
| Environment variable | Description | Supported versions | Additional packages |
| -------------------------- | -------------------------- | ------------------------------------------------ | -------------------------------------------------------------------- |
| `CODEX_ENV_PYTHON_VERSION` | Python version to install | `3.10`, `3.11.12`, `3.12`, `3.13` | `pyenv`, `poetry`, `uv`, `ruff`, `black`, `mypy`, `pyright`, `isort` |
| `CODEX_ENV_NODE_VERSION` | Node.js version to install | `18`, `20`, `22` | `corepack`, `yarn`, `pnpm`, `npm` |
| `CODEX_ENV_RUST_VERSION` | Rust version to install | `1.83.0`, `1.84.1`, `1.85.1`, `1.86.0`, `1.87.0` | |
| `CODEX_ENV_GO_VERSION` | Go version to install | `1.22.12`, `1.23.8`, `1.24.3` | |
| `CODEX_ENV_SWIFT_VERSION` | Swift version to install | `5.10`, `6.1` | |
## What's included
In addition to the packages specified in the table above, the following packages are also installed:
- `ruby`: 3.2.3
- `bun`: 1.2.10
- `java`: 21
- `bazelisk` / `bazel`
See [Dockerfile](Dockerfile) for the full details of installed packages.