What I just tagged
I just tagged v1.3.2 of codex-container! It runs the OpenAI Codex CLI inside a Docker container. Your workspace is mounted in, your .env gets injected and the Codex config persists between runs. The host stays clean. The code is at https://github.com/kleinpanic/codex-container.
How it works
The core is one wrapper script, also called codex-container. Next to it sit a Dockerfile, an entrypoint, a docker-compose file and a Makefile. The image starts from alpine:3.19 and installs Codex with npm as a user named codex. The no-new-privileges option is on by default.
Each workspace gets its own container. You manage it with start, stop, rm, status, shell and exec. The --search flag is passed straight to codex. The release also has:
- SSH agent forwarding
- git identity propagation
- persistent config and pipx
- bash and zsh completions
- prune-images to clear old images
- --dry-run to see what it would do
- an optional agent mode that shares the host Docker socket (--agent-docker)
Install
git clone https://github.com/kleinpanic/codex-container
cd codex-container && make install-user
codex-container --build
codex-container start
The make target puts a symlink on your PATH. After that you run codex-container --search.
What is not done
The versions before this one only live in the CHANGELOG. The first commit is from 2026-01-26. Versions 1.1.0, 1.2.0 and 1.3.0 never got tags.
What is next
Try it and tell me if it breaks. I want to know.
P.S Thanks for reading. Consider subbing to the RSS feed.
Klein Panic