{"id":32667366,"url":"https://github.com/tgagor/docker-gemini-cli","last_synced_at":"2026-06-05T13:00:40.560Z","repository":{"id":321749360,"uuid":"1087007012","full_name":"tgagor/docker-gemini-cli","owner":"tgagor","description":"Gemini CLI wrapped as a Docker image, so you don't need to trash your OS with Node and it's dependencies.","archived":false,"fork":false,"pushed_at":"2026-06-01T09:39:19.000Z","size":81,"stargazers_count":18,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T11:25:09.258Z","etag":null,"topics":["ai","docker","gemini","gemini-ai","gemini-cli"],"latest_commit_sha":null,"homepage":"https://gagor.pro/2025/10/running-gemini-cli-in-a-docker-container/","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tgagor.png","metadata":{"files":{"readme":"README-TEMPLATE.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-31T08:29:59.000Z","updated_at":"2026-06-01T09:39:40.000Z","dependencies_parsed_at":"2025-10-31T10:27:53.260Z","dependency_job_id":"db7557f4-a522-4a31-af4a-d10f4cde4932","html_url":"https://github.com/tgagor/docker-gemini-cli","commit_stats":null,"previous_names":["tgagor/docker-gemini-cli"],"tags_count":68,"template":false,"template_full_name":null,"purl":"pkg:github/tgagor/docker-gemini-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgagor%2Fdocker-gemini-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgagor%2Fdocker-gemini-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgagor%2Fdocker-gemini-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgagor%2Fdocker-gemini-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tgagor","download_url":"https://codeload.github.com/tgagor/docker-gemini-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgagor%2Fdocker-gemini-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33942436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","docker","gemini","gemini-ai","gemini-cli"],"created_at":"2025-11-01T02:01:05.533Z","updated_at":"2026-06-05T13:00:40.554Z","avatar_url":"https://github.com/tgagor.png","language":"Dockerfile","funding_links":[],"categories":["Development Tools \u0026 Utilities"],"sub_categories":[],"readme":"# Gemini CLI in Docker\n\nA convenient and isolated way to run the [Gemini CLI](https://github.com/google-gemini/gemini-cli) without needing to install Node.js or its dependencies on your local system. This repository provides automatically updated Docker images.\n\n[![build](https://github.com/tgagor/docker-gemini-cli/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/tgagor/docker-gemini-cli/actions/workflows/build.yml)\n![GitHub](https://img.shields.io/github/license/tgagor/docker-gemini-cli)\n![Docker Stars](https://img.shields.io/docker/stars/tgagor/gemini-cli)\n![Docker Pulls](https://img.shields.io/docker/pulls/tgagor/gemini-cli)\n![GitHub Release Date](https://img.shields.io/github/release-date/tgagor/docker-gemini-cli)\n\n\n## Prerequisites\n\n* [Docker](https://docs.docker.com/get-docker/) must be installed and running on your system.\n\n## Usage\n\n### Recommended Setup\n\nThe 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`:\n\n```bash\nfunction gemini {\n    local tty_args=\"\"\n    if [ -t 0 ]; then\n        tty_args=\"--tty\"\n    fi\n\n    docker run -i ${tty_args} --rm \\\n        -v \"$(pwd):/home/gemini/workspace\" \\\n        -v \"$HOME/.gemini:/home/gemini/.gemini\" \\\n        -e DEFAULT_UID=$(id -u) \\\n        -e DEFAULT_GID=$(id -g) \\\n        -e TERM=\"${TERM:-xterm-256color}\" \\\n        -e COLORTERM=\"${COLORTERM:-truecolor}\" \\\n        tgagor/gemini-cli \"$@\"\n}\n```\n\nThis setup:\n- Mounts your current directory as `/home/gemini/workspace` inside the container\n- Mounts `~/.gemini` to preserve Gemini CLI configuration between runs\n- Matches container user permissions with your local user to avoid file ownership issues\n- Handles TTY properly for interactive use\n- Thanks to [Lewis](https://github.com/Lewiscowles1986) colors are also handled properly\n- To use the Bun variant, simply use `bun` tag: `tgagor/gemini-cli:bun`\n\n#### Platform-specific Notes\n\n**Linux:**\n- Works out of the box with the setup above\n- File permissions are handled automatically through UID/GID mapping\n\n**macOS:**\n- The setup works the same way\n- File permissions might behave differently due to how Docker Desktop handles mounting on macOS\n- If you experience permission issues, you may need to add `:delegated` to volume mounts for better performance\n\n#### Runtime Variants\n\nThis repository provides two runtime variants:\n\n- **Node.js** (default): Available on `linux/amd64`, `linux/arm64`, and `linux/arm/v7`. Use standard tags like `latest`, `v{{ .GEMINI_CLI_VERSION }}`.\n- **Bun**: Faster alternative available on `linux/amd64` and `linux/arm64` only. Use tags with `bun` suffix (e.g., `bun`, `v{{ .GEMINI_CLI_VERSION }}-bun`).\n\n### Basic Docker Usage\n\nWhile not recommended, you can still run the container directly with Docker commands:\n\n```bash\ndocker run --rm -it \\\n    -v \"$(pwd):/home/gemini/workspace\" \\\n    -v \"$HOME/.gemini:/home/gemini/.gemini\" \\\n    -e DEFAULT_UID=$(id -u) \\\n    -e DEFAULT_GID=$(id -g) \\\n    -e TERM=\"${TERM:-xterm-256color}\" \\\n    -e COLORTERM=\"${COLORTERM:-truecolor}\" \\\n    tgagor/gemini-cli [command]\n```\n\n### Examples\n\n**Using the shell function (recommended):**\n```bash\n# Get help\ngemini --help\n\n# Process a local file\ngemini your-prompt-file.txt\n\n# Pipe file as context\ncat doc.md | gemini -p \"Correct grammar\"\n\n# Use interactive mode\ngemini\n```\n\n## Supported Tags\n\nThe following tags are available on [Docker Hub](https://hub.docker.com/r/tgagor/gemini-cli):\n\n### Node.js (Default)\n\n*   [`latest`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Most recent stable version.\n*   [`alpine`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Latest with Alpine Linux base.\n*   [`v{{ .GEMINI_CLI_VERSION }}`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Specific version.\n*   [`v{{ .GEMINI_CLI_VERSION }}-alpine`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Specific version with Alpine base.\n*   [`v{{ .GEMINI_CLI_VERSION | splitList \".\" | first }}.{{ .GEMINI_CLI_VERSION | splitList \".\" | rest | first }}`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Latest patch for a minor version.\n*   [`v{{ .GEMINI_CLI_VERSION | splitList \".\" | first }}.{{ .GEMINI_CLI_VERSION | splitList \".\" | rest | first }}-alpine`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Latest patch with Alpine base.\n*   [`v{{ .GEMINI_CLI_VERSION | splitList \".\" | first }}`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Latest minor release for a major version.\n*   [`v{{ .GEMINI_CLI_VERSION | splitList \".\" | first }}-alpine`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Latest minor with Alpine base.\n\n### Bun (⚠️ amd64 and arm64 only)\n\n*   [`bun`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Latest with Bun runtime.\n*   [`v{{ .GEMINI_CLI_VERSION }}-bun`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Specific version with Bun.\n*   [`v{{ .GEMINI_CLI_VERSION | splitList \".\" | first }}.{{ .GEMINI_CLI_VERSION | splitList \".\" | rest | first }}-bun`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Latest patch for a minor version with Bun.\n*   [`v{{ .GEMINI_CLI_VERSION | splitList \".\" | first }}-bun`](https://hub.docker.com/r/tgagor/gemini-cli/tags): Latest minor with Bun.\n\n## Security\n\nImages are automatically scanned for vulnerabilities. You can view the latest security report [here](https://github.com/tgagor/docker-gemini-cli/security/advisories).\n\n## Image sizes\n![Docker Image Size](https://img.shields.io/docker/image-size/tgagor/gemini-cli?arch=amd64\u0026label=tgagor%2Fgemini-cli%20(amd64))\n![Docker Image Size](https://img.shields.io/docker/image-size/tgagor/gemini-cli?arch=arm64\u0026label=tgagor%2Fgemini-cli%20(arm64))\n![Docker Image Size](https://img.shields.io/docker/image-size/tgagor/gemini-cli?arch=arm\u0026label=tgagor%2Fgemini-cli%20(arm))\n\n## Images\nYou can fetch docker image from:\n* [tgagor/gemini-cli](https://hub.docker.com/r/tgagor/gemini-cli)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgagor%2Fdocker-gemini-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftgagor%2Fdocker-gemini-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgagor%2Fdocker-gemini-cli/lists"}