(fix) update Docker container scripts (#47)

* Fix Docker container scripts

Signed-off-by:: Eric Burke <eburke@openai.com>

* Build codex TGZ

* fix run_in_container

---------

Co-authored-by: Kyle Kosic <kylekosic@openai.com>
This commit is contained in:
Eric Burke
2025-04-16 12:02:41 -07:00
committed by GitHub
parent 24e86da575
commit b6846ce07f
4 changed files with 42 additions and 18 deletions

View File

@@ -1,3 +1,16 @@
#!/bin/bash
docker build -t codex -f codex-cli/Dockerfile codex-cli
set -euo pipefail
SCRIPT_DIR=$(realpath "$(dirname "$0")")
trap "popd >> /dev/null" EXIT
pushd "$SCRIPT_DIR/.." >> /dev/null || {
echo "Error: Failed to change directory to $SCRIPT_DIR/.."
exit 1
}
npm install
npm run build
rm -rf ./dist/openai-codex-*.tgz
npm pack --pack-destination ./dist
mv ./dist/openai-codex-*.tgz ./dist/codex.tgz
docker build -t codex -f "./Dockerfile" .