services: codex: build: context: . dockerfile: Dockerfile container_name: TrackingKits-codex working_dir: /workspace tty: true stdin_open: true # Mount your current folder into /workspace (run compose from your repo folder) volumes: - ./:/workspace # Persist Codex auth + config (maps to CODEX_HOME) - ./volumes/codex_home:/codex # Optional (recommended if you want Codex to run docker commands): # Gives the container access to your host Docker daemon. # SECURITY NOTE: docker.sock is effectively root on the host. - /var/run/docker.sock:/var/run/docker.sock environment: - CODEX_HOME=/codex # Optional: if you prefer API-key auth instead of ChatGPT login # - OPENAI_API_KEY=${OPENAI_API_KEY} # Keep container running so you can exec into it anytime command: ["bash", "-lc", "sleep infinity"]