diff options
| author | Olcan <[email protected]> | 2025-04-20 08:22:17 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-20 08:22:17 -0700 |
| commit | 99f5ed9ecb2aa491612ecaed4139cdeda086681f (patch) | |
| tree | d3dbb72075c2a8afc51abe895fdda070442ecc0e /scripts/start_container.sh | |
| parent | 044ccc6dd710c660faf6220409358eff375a099c (diff) | |
Minimal container setup. Install docker (or podman), build container with scripts/build_container.sh, then start with scripts/start_container.sh. Exit with ^C for now. (#61)
Diffstat (limited to 'scripts/start_container.sh')
| -rwxr-xr-x | scripts/start_container.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/start_container.sh b/scripts/start_container.sh new file mode 100755 index 00000000..d3f4234f --- /dev/null +++ b/scripts/start_container.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +IMAGE=gemini-code-sandbox +CLI_DIST=/usr/local/share/npm-global/lib/node_modules/\@gemini-code/cli/dist + +# use docker if installed, otherwise try to use podman instead +if command -v docker &> /dev/null; then + CMD=docker +elif command -v podman &> /dev/null; then + CMD=podman +else + echo "ERROR: docker or podman must be installed" + exit 1 +fi + +$CMD run -it --rm -v"$PWD:/project" --workdir /project "$IMAGE" node "$CLI_DIST"
\ No newline at end of file |
