feat: add build:sandbox and build:all npm scripts (#274)
This commit is contained in:
parent
739654bb25
commit
49b5db29b3
|
@ -76,7 +76,7 @@ Chances are you will need to manually address errors output. You can also try `n
|
||||||
|
|
||||||
## Sandboxing
|
## Sandboxing
|
||||||
|
|
||||||
To enable sandboxing, set `GEMINI_CODE_SANDBOX=true|docker|podman|<command>` in your environment or `.env` file. Once enabled, `npm run build` will build a minimal container ("sandbox") image and `npm start` will launch inside a fresh instance of that container. Requires the specified command (or if `true` then either `docker` or `podman`) to be available on host machine.
|
To enable sandboxing, set `GEMINI_CODE_SANDBOX=true|docker|podman|<command>` in your environment or `.env` file. Once enabled, `npm run build:all` will build a minimal container ("sandbox") image and `npm start` will launch inside a fresh instance of that container. Requires the specified command (or if `true` then either `docker` or `podman`) to be available on host machine.
|
||||||
|
|
||||||
The sandbox (container) mounts the current directory with read-write access and is started/stopped/removed automatically as you start/stop Gemini Code. You can tell you are inside the sandbox with the `cwd` being reported as `/sandbox/<project>`. Files created within the sandbox should be automatically mapped to your user/group on host machine.
|
The sandbox (container) mounts the current directory with read-write access and is started/stopped/removed automatically as you start/stop Gemini Code. You can tell you are inside the sandbox with the `cwd` being reported as `/sandbox/<project>`. Files created within the sandbox should be automatically mapped to your user/group on host machine.
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "BUILD_SANDBOX=1 scripts/build.sh",
|
"build": "scripts/build.sh",
|
||||||
|
"build:sandbox": "scripts/build_sandbox.sh",
|
||||||
|
"build:all": "npm run build && npm run build:sandbox",
|
||||||
"clean": "scripts/clean.sh",
|
"clean": "scripts/clean.sh",
|
||||||
"test": "npm run test --workspaces",
|
"test": "npm run test --workspaces",
|
||||||
"start": "NODE_ENV=development scripts/start.sh",
|
"start": "NODE_ENV=development scripts/start.sh",
|
||||||
|
|
Loading…
Reference in New Issue