Commit Graph

104 Commits

Author SHA1 Message Date
Olcan
825cecc089 SANDBOX_SET_UID_GID option for systems where this is necessary (should be only rootful docker on linux w/o userns-remap configured) (#210)
* SANDBOX_SET_UID_GID option for systems where this is necessary (should be only rootful docker on linux w/o userns-remap configured)

* Merge remote-tracking branch 'origin/main' into sandbox_uid_gid
2025-04-29 08:43:24 -07:00
Brandon Keiji
df44ffbcff fix: point start.sh to relative path (#209) 2025-04-29 02:44:59 +00:00
Olcan
0d849bf58e enable servers in sandbox to listen on localhost (127.0.0.1) instead of 0.0.0.0, ensuring servers can be container/host-agnostic (#207)
* enable servers in sandbox to listen on localhost (127.0.0.1) instead of 0.0.0.0, ensuring servers can be container/host-agnostic

* Merge remote-tracking branch 'origin/main' into sandbox_localhost_works
2025-04-28 18:40:24 -07:00
Olcan
cd1ddcb4f1 SANDBOX_PORTS env var (#204) 2025-04-28 15:44:17 -07:00
Olcan
57ceadb7d8 switch to shell tool, deprecating terminal (#203)
* switch to shell tool, deprecating terminal

* Merge remote-tracking branch 'origin/main' into deprecate_terminal
2025-04-28 15:05:36 -07:00
Olcan
304d1f2712 env flags SANDBOX_{MOUNTS,ENV}, improved debugging through sandbox that should now work in all scenarios (#201)
* env flags SANDBOX_{MOUNTS,ENV}, improved debugging through sandbox that should now work in all scenarios

* Merge remote-tracking branch 'origin/main' into sandbox_flags_improved_debugging
2025-04-28 12:44:34 -07:00
Brandon Keiji
64910527de refactor: remove node_modules reference in start command (#198) 2025-04-28 09:26:46 -07:00
Olcan
491a9da80b rename dev image with -dev suffix (#195) 2025-04-28 08:52:18 -07:00
Olcan
7828e813a8 hop into sandbox (#186) 2025-04-26 21:27:36 -07:00
Olcan
86c3a3234f do not clean before package build (#175) 2025-04-25 13:01:40 -07:00
Olcan
415ec91c6d detect missing sandbox image and provide useful error message (#174) 2025-04-25 12:38:38 -07:00
Olcan
320f54e205 instant (dev) sandbox (#171)
* instant (dev) sandbox

* leave Dockerfile as is to pass deploy test

* fix comma

* fix prod build

* do not use "images exists" which docker does not support

* separate dev-mode flag

* Merge remote-tracking branch 'origin/main' into instant_sandbox
2025-04-25 10:58:23 -07:00
Olcan
39cdba06a6 pass model env var to sandbox (#167) 2025-04-25 15:28:14 +00:00
Olcan
cbba8007b2 shell bones (#160)
* shell bones

* Merge remote-tracking branch 'origin/main' into shell_bones

* add line break

* another line break

* drop the log to avoid breaking terminals

* rename tool to be consistent with terminal

* fix build
2025-04-24 18:03:33 -07:00
Brandon Keiji
0510d06ecf infra: automate continuous deployment (#157) 2025-04-24 14:36:58 -07:00
Brandon Keiji
d394a9f39f feat: add flag to customize package version during pre-release staging (#155) 2025-04-24 13:02:49 -07:00
Olcan
30bdef9bf5 in sandboxed run scripts, allow .env to be an in any ancestor directory, same as in findEnvFile; also prep for sanboxing with global command (#147) 2025-04-24 08:58:47 -07:00
Seth Troisi
bf6e809abf Pass GEMINI_API_KEY env variable to sandbox 2025-04-23 18:22:58 -07:00
Brandon Keiji
31045e6086 fix: revert pointing npm start to .bin (#144) 2025-04-24 01:21:07 +00:00
Brandon Keiji
c24dc0ec77 feat: add react dev tools (#143) 2025-04-23 18:16:15 -07:00
Seth Troisi
105c20146c Add generic container run command for npm start 2025-04-23 18:07:29 -07:00
Seth Troisi
d771dcbdb9 Support GEMINI_CODE_SANDBOX=0/false as no SANDBOXing 2025-04-23 16:33:19 -07:00
Brandon Keiji
94c04955c8 fix: use process.env.CLI_VERSION to avoid conflicts with NODE_ENV (#139) 2025-04-23 15:49:18 -07:00
Seth Troisi
72d0b73598 Add docker equivilant for --authfile 2025-04-23 15:46:51 -07:00
Brandon Keiji
7f3798e180 feat: add CLI version number to footer (#134) 2025-04-23 15:00:40 -07:00
Seth Troisi
acc655d35f Default TMPDIR to /tmp/ for sandbox (#133) 2025-04-23 14:36:15 -07:00
Olcan
a792c4a159 fix .env check (#123) 2025-04-22 14:31:02 -07:00
Olcan
5e34d9e276 Refactor_sandbox_command (#121) 2025-04-22 13:51:50 -07:00
Olcan
1ed9743ad4 quiet sandbox build (#111) 2025-04-21 23:26:53 -07:00
Brandon Keiji
79710375e3 fix: point npmrc to dogfood artifact registry (#108) 2025-04-21 23:11:51 -07:00
Brandon Keiji
98fa8d2b51 fix: support node globals in scripts (#109) 2025-04-22 06:10:25 +00:00
Benjamin Bastian
1eeadcd85c Update sandbox script to not require term variables (#105)
If `nounset` is active, it'll require that TERM and COLORTERM is set in the
environment. It's not necessary that these variables are set and it should be
passed to the sandbox. This change just causes the TERM and COLORTERM to be set
to an empty string if they are unset.
2025-04-21 22:59:49 -07:00
Olcan
319f211211 improved (full color) sandbox, mount /tmp to display build warnings, display sandbox name in footer (#96) 2025-04-21 14:43:43 -07:00
Seth Troisi
7663ccf0bd Fix Docker Build permission issue (#95)
During docker build `npm install` running as node was exiting with 243 (EACCES) from trying to install the tgz files because `npm pack` created the files with 400 permissions on my system.
2025-04-21 14:35:03 -07:00
Olcan
09973956ae sandbox.sh utility to easily log into or execute commands in a sandbox, set hostname and SANDBOX env var to container name (#92) 2025-04-21 13:52:51 -07:00
Olcan
2571e07175 enable debugging through sandbox (#88) 2025-04-21 12:39:58 -07:00
Olcan
dea0782c89 fix flags via sandbox (again) (#87) 2025-04-21 12:13:16 -07:00
Olcan
618f8a43cf don't assume .env file (#83) 2025-04-21 11:21:48 -07:00
Jaana Dogan
0a531f732b Ignore grep error if .env doesn't exist (#82)
.env file is optional. If it doesn't exist, the current script outputs "grep: .env: No such file or directory".
2025-04-21 11:15:55 -07:00
Tyler
7f95c594c0 More license headers, add a CONTRIBUTING.md file (also fix README.md formatting) (#81) 2025-04-21 10:04:03 -07:00
Olcan
fad526c63f make sandbox attachable, document in README (#80) 2025-04-21 09:17:17 -07:00
Olcan
39bdedab9c seamless sandboxing (just set GEMINI_CODE_SANDBOX=true in .env) (#76) 2025-04-21 07:50:18 -07:00
Olcan
d668600672 fix passing of flags through start scripts (#73) 2025-04-20 19:19:42 -07:00
Olcan
305ed41b88 drop /dist suffix no longer needed (#71) 2025-04-20 14:55:36 -07:00
Olcan
ef909f6335 start and debug scripts (will enable seamless container use later), strict error handling in bash scripts (#63)
#61
2025-04-20 14:50:12 -07:00
Olcan
c80800a3ee use /sandbox/<proj_name> instead of /project as workdir in container (#64) 2025-04-20 14:49:02 -07:00
Brandon Keiji
d6556c5246 fix: remove 'dist' suffix from start_container.sh command (#67) 2025-04-20 13:07:54 -07:00
Olcan
99f5ed9ecb 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) 2025-04-20 08:22:17 -07:00
Tyler
4354458cad Add apache2 SPDX headers to all source files (#48) 2025-04-18 17:44:24 -07:00
Taylor Mullen
40e11e053c Fix remaining tslint errors (YAY).
- Also updated ci.yml to ensure that linting failures will break the build.

Fully fixes https://b.corp.google.com/issues/411384603
2025-04-18 19:14:36 -04:00