{"id":32789532,"url":"https://github.com/european-epc-competence-center/opencode-container","last_synced_at":"2026-05-17T03:10:59.192Z","repository":{"id":321138017,"uuid":"1072920878","full_name":"european-epc-competence-center/opencode-container","owner":"european-epc-competence-center","description":"A Docker container for running OpenCode in an isolated environment to protect your host system from potential AI-executed commands.","archived":false,"fork":false,"pushed_at":"2026-04-22T08:38:31.000Z","size":77,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-22T10:31:46.535Z","etag":null,"topics":["ai","container","container-image","containerization","opencode"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/european-epc-competence-center.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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-09T11:47:23.000Z","updated_at":"2026-04-22T08:38:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f7b89b5-849d-4690-9ba2-8b9b884839be","html_url":"https://github.com/european-epc-competence-center/opencode-container","commit_stats":null,"previous_names":["european-epc-competence-center/opencode-container"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/european-epc-competence-center/opencode-container","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/european-epc-competence-center%2Fopencode-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/european-epc-competence-center%2Fopencode-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/european-epc-competence-center%2Fopencode-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/european-epc-competence-center%2Fopencode-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/european-epc-competence-center","download_url":"https://codeload.github.com/european-epc-competence-center/opencode-container/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/european-epc-competence-center%2Fopencode-container/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33126090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"online","status_checked_at":"2026-05-17T02:00:05.366Z","response_time":107,"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","container","container-image","containerization","opencode"],"created_at":"2025-11-05T11:00:31.221Z","updated_at":"2026-05-17T03:10:59.187Z","avatar_url":"https://github.com/european-epc-competence-center.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Docker](https://github.com/european-epc-competence-center/opencode-container/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/european-epc-competence-center/opencode-container/actions/workflows/docker-publish.yml)\n\n# OpenCode Container\n\nA Docker container for running OpenCode in an isolated environment to protect your host system from potential AI-executed commands.\n\n## Overview\n\nThis project provides a containerized OpenCode installation that:\n\n- Isolates OpenCode execution from your host system\n- Restricts AI operations to mounted project directories only\n- Preserves OpenCode configuration across container restarts\n- Initializes EECC opencode config, if not already initialized\n- Initializes `.cursor/rules` in any workdir, if not already present.\n\n## Usage\n\nRecommended: Create a link to the run script in your path. The following creates a bin symlink callen `opencode`, you may of course choose another name.\n\n```\nwget https://github.com/european-epc-competence-center/opencode-container/raw/refs/heads/main/opencode.sh \\ \n  -O ~/.local/bin/opencode.sh\n\nchmod +x ~/.local/bin/opencode.sh\n```\n\nthen you can run opencode from your project folder\n\n```\ncd my_awesome_project\nopencode.sh\n```\n\nOr also use open code commands like\n\n```\nopencode.sh run \"analyze project and init or update notes according to @./cusror/rules/notes.md\"\n```\n\n## Local Build\n\n```bash\n# Clone this repository\ngit clone git@gitlab.eecc.info:eecc-internal/opencode-container.git\ncd opencode-container\n\n./opencode.sh -b\n```\n\nThis will:\n\n1. Build the OpenCode Docker image (if not already built, force with `-b`)\n2. Mount your current directory to `/app` in the container\n3. Mount OpenCode config directories for persistence\n4. Start an interactive OpenCode session\n\n## Mounting Additional Volumes\n\nYou can mount additional directories into the container using either command line options or environment variables.\n\n### Using Command Line Options\n\nUse the `-v` option to mount additional volumes (can be specified multiple times):\n\n```bash\n# Mount a single additional volume\n./build_and_run_opencode_container.sh -v /host/data:/container/data\n\n# Mount multiple volumes\n./build_and_run_opencode_container.sh -v /host/data:/data -v /host/logs:/logs\n```\n\n### Using Environment Variables\n\nSet the `OPENCODE_EXTRA_MOUNTS` environment variable with semicolon-separated mount specifications:\n\n```bash\n# Mount multiple volumes via environment variable\nOPENCODE_EXTRA_MOUNTS=\"/host/data:/data;/host/logs:/logs\" ./build_and_run_opencode_container.sh\n\n# Or export it for all subsequent runs\nexport OPENCODE_EXTRA_MOUNTS=\"/host/data:/data;/host/logs:/logs\"\n./build_and_run_opencode_container.sh\n```\n\n### Mount Format\n\nBoth methods use the Docker volume mount format: `/host/path:/container/path`\n\nFor read-only mounts, append `:ro`: `/host/path:/container/path:ro`\n\n## License\n\nCopyright 2025 European EPC Competence Center GmbH (EECC). Corresponding Author: Sebastian Schmittner \u003csebastian.schmittner@eecc.de\u003e\n\n\u003ca href=\"https://www.gnu.org/licenses/agpl-3.0.html\"\u003e\n\u003cimg alt=\"AGPLV3\" style=\"border-width:0\" src=\"https://www.gnu.org/graphics/agplv3-with-text-162x68.png\" /\u003e\u003cbr /\u003e\n\u003c/a\u003e\n\nAll code published in this repository is free software: you can redistribute it and/or modify it under the terms of the\nGNU General Public License as published by the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\u003c/a\u003e\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\n[See LICENSE for details](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuropean-epc-competence-center%2Fopencode-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuropean-epc-competence-center%2Fopencode-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuropean-epc-competence-center%2Fopencode-container/lists"}