Run the Gemini CLI without needing to install Node.js or its dependencies on your local system.
10K+
A convenient and isolated way to run the Gemini CLI without needing to install Node.js or its dependencies on your local system. This repository provides automatically updated Docker images.
The recommended way to use this image is to create a shell function that handles all the necessary mount points and permissions. Add the following function to your ~/.bash_aliases or ~/.zsh_aliases:
function gemini {
local tty_args=""
if [ -t 0 ]; then
tty_args="--tty"
fi
docker run -i ${tty_args} --rm \
-v "$(pwd):/home/gemini/workspace" \
-v "$HOME/.gemini:/home/gemini/.gemini" \
-e DEFAULT_UID=$(id -u) \
-e DEFAULT_GID=$(id -g) \
tgagor/gemini-cli "$@"
}
This setup:
/home/gemini/workspace inside the container~/.gemini to preserve Gemini CLI configuration between runsLinux:
macOS:
:delegated to volume mounts for better performanceWhile not recommended, you can still run the container directly with Docker commands:
docker run --rm -it \
-v "$(pwd):/home/gemini/workspace" \
-v "$HOME/.gemini:/home/gemini/.gemini" \
-e DEFAULT_UID=$(id -u) \
-e DEFAULT_GID=$(id -g) \
tgagor/gemini-cli [command]
Using the shell function (recommended):
# Get help
gemini --help
# Process a local file
gemini your-prompt-file.txt
# Pipe file as context
cat doc.md | gemini -p "Correct grammar"
# Use interactive mode
gemini
The following tags are available on Docker Hub:
latest: The most recent, stable version of the Gemini CLI.vX.Y.Z (e.g., v0.4.0): Corresponds to a specific version of the Gemini CLI.vX.Y (e.g., v0.4): Points to the latest patch release for a minor version.vX (e.g., v0): Points to the latest minor release for a major version.Images are automatically scanned for vulnerabilities. You can view the latest security report here.
Content type
Image
Digest
sha256:2496aa02a…
Size
62.4 MB
Last updated
3 days ago
docker pull tgagor/gemini-cli