Ability to inject a command prior to docker sandbox entrypoint
What would you like to be added?
The ability to execute commands just prior to the Docker sandbox entrypoint.
Why is this needed?
Would allow easily installing requisite tools (nix and direnv come to mind) without having to move to a full-blown sandbox.Dockerfile (especially since that doesn't work with npx @google/gemini-cli) by having the pre-entry command be something like apt-get install -y nix direnv.
Additional context
This could probably be added quite trivially right around here:
https://github.com/google-gemini/gemini-cli/blob/2865a527787a741e478f542c57b4c4b0049a5adf/packages/cli/src/utils/sandbox.ts#L179
Is this about the dockerie-zasation of the CLI? I guess that would be awesome but we need to be careful because it is like a cage... Think about everything twice, please
Not quite — it's just that I want the ability to run a shell command inside the docker container prior to it running gemini. Which is otherwise quite inconvenient to achieve.
We allow you to specify your own docker image to use so you can just create one that runs the appropriate script as a workaround.
You mean via sandbox.Dockerfile? That doesn't work with npx @google/gemini-cli as far as I can tell, and also doesn't support user-wide configuration — it can only be set per project as per #5976.
Ah. Good point. Yeah.
I triaged https://github.com/google-gemini/gemini-cli/issues/5976 so hopefully we'll get a chance to look into it. Alternatively, consider sending us a PR to fix it.
Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.
It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.
Thank you for your contribution!
This is still relevant and should be re-opened.