{"id":29353692,"url":"https://github.com/alex3305/forgejo-runner-dind","last_synced_at":"2025-07-09T02:08:57.423Z","repository":{"id":303371411,"uuid":"1014687182","full_name":"alex3305/forgejo-runner-dind","owner":"alex3305","description":"Forgejo act-runner with dind included","archived":false,"fork":false,"pushed_at":"2025-07-07T08:22:22.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-07T09:34:45.807Z","etag":null,"topics":["act","ci","dind","docker","forgejo","runner"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alex3305.png","metadata":{"files":{"readme":"README.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}},"created_at":"2025-07-06T07:58:41.000Z","updated_at":"2025-07-07T08:55:52.000Z","dependencies_parsed_at":"2025-07-07T09:46:52.036Z","dependency_job_id":null,"html_url":"https://github.com/alex3305/forgejo-runner-dind","commit_stats":null,"previous_names":["alex3305/forgejo-runner-dind"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/alex3305/forgejo-runner-dind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3305%2Fforgejo-runner-dind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3305%2Fforgejo-runner-dind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3305%2Fforgejo-runner-dind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3305%2Fforgejo-runner-dind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex3305","download_url":"https://codeload.github.com/alex3305/forgejo-runner-dind/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex3305%2Fforgejo-runner-dind/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264379216,"owners_count":23598824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["act","ci","dind","docker","forgejo","runner"],"created_at":"2025-07-09T02:08:56.806Z","updated_at":"2025-07-09T02:08:57.383Z","avatar_url":"https://github.com/alex3305.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003e\n  \u003cimg src=\"assets/forgejo-animated.png\" alt=\"Forgejo\" width=\"100\"\u003e\n  \u003cbr/\u003e\u003cbr/\u003e\n  Forgejo runner ❤️ \u003ci\u003edind\u003c/i\u003e\n\u003c/h3\u003e\n\n\u003ch4 align=\"center\"\u003e\n  Container image that combines Forgejo Runner 🏃 with \u003ci\u003eDocker-in-Docker\u003c/i\u003e 🐳.\n\u003c/h4\u003e\n\n## Usage\n\n### Docker Compose\n\n```yaml\nservices:\n  forgejo:\n    image: codeberg.org/forgejo/forgejo:latest\n    network:\n      internal:\n\n  forgejo-runner:\n    image: alex3305/forgejo-runner-dind:latest\n    privileged: true\n    network:\n      internal:\n    volumes:\n      - /opt/forgejo/runner:/config\n    environment:\n      CONFIG_FILE: /config/config.yaml\n      FORGEJO_INSTANCE_URL: http://forgejo:3000\n      FORGEJO_RUNNER_NAME: my-first-forgejo-runner\n      FORGEJO_REGISTRATION_TOKEN: JLcy4PhU8wMBmt2mpu5BmW1OqDVlojtPzmQl9mdC\n\nnetworks:\n  internal:\n    name: forgejo\n```\n\n\u003e [!NOTE]\n\u003e Privileged mode is required for Docker in Docker to function properly. This is explained in [docker-library/docker#151](https://github.com/docker-library/docker/issues/151#issuecomment-483185972) and [docker-library/docker#281](https://github.com/docker-library/docker/issues/281#issuecomment-744766015). However this is still a security issue thats need to treated appropriately. \n\n### Environment variables\n\n| Variable                     | Required |               Default               | Description                                                                                             |\n| ---------------------------- | :------: | :---------------------------------: | ------------------------------------------------------------------------------------------------------- |\n| `FORGEJO_INSTANCE_URL`       |   ✅*    |                                     | URL of the Forgejo instance. This is a required variable until registration.                            |\n| `FORGEJO_REGISTRATION_TOKEN` |   ✅*    |                                     | Forgejo Registration token. This is a required variable until registration._                            |\n| `FORGEJO_RUNNER_NAME`        |    ✅    |             _hostname_              | Name of the Forgejo runner. This defaults to the hostname of the container.                             |\n| `CONFIG_FILE`                |    ❌    |                                     | The optional config file that is used for this runner. Must be a path that is mounted in the container. |\n| `DOCKER_HOST`                |    ❌    | `unix:///run/user/1000/docker.sock` | The Docker socket that Forgejo Runner connects to.                                                        |\n| `FORGEJO_RUNNER_LABELS`      |    ❌    |                                     | Optional Forgejo runner labels                                                                          |\n| `EXTRA_ARGS`                 |    ❌    |                                     | Optional additional arguments                                                                           |\n\n#### Forgejo Instance URL\n\nThis is the instance URL of Forgejo that must be reachable by the runner.\n\n#### Forgejo Registration Token\n\nThe registration token is used to register Forgejo Runner to Forgejo. This works as an authentication and authorization token. This token can be found under `/admin/actions/runners` on your Forgejo instance.\n\n\u003e [!NOTE]\n\u003e After registration, the Forgejo Instance URL and Registration Token will be stored in a `/config/.runner` file. After this file is created, the provided environment variables will not be used.\n\n### Configuration file\n\nIt is also possible to generate a Forgejo Runner configuration file. This provides far more customization and options than just using the runner.\n\n```bash\ndocker run -t --rm \\\n        --name forgejo-config-generator \\\n        --entrypoint forgejo-runner \\\n        alex3305/forgejo-runner-dind:latest \\\n        generate-config\n```\n\nWhich will generate the latest template configuration to standard out. This can also be output to a file for later use.\n\n```bash\nmkdir -p /opt/forgejo/runner/\ndocker run -t --rm \\\n        --name forgejo-config-generator \\\n        --entrypoint forgejo-runner \\\n        alex3305/forgejo-runner-dind:latest \\\n        generate-config \u003e /opt/forgejo/runner/config.yaml\n```\n\n#### Required variables\n\nWithin the configuration file it is required for the following options to be set:\n\n```yaml\ncontainer:\n  # Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).\n  privileged: true\n  # overrides the docker client host with the specified one.\n  # If \"-\" or \"\", an available docker host will automatically be found.\n  # If \"automount\", an available docker host will automatically be found and mounted in the job container (e.g. /var/run/docker.sock).\n  # Otherwise the specified docker host will be used and an error will be returned if it doesn't work.\n  docker_host: \"automount\"\n```\n\nFailing to do so may lead to unexpected results. For instance in jobs not starting or unable to access the Docker daemon within a job.\n\n## Development\n\nBuilding the container image is done with BuildKit:\n\n```bash\ndocker buildx build . -t forgejo-runner-dind\n```\n\nAfter which testing can be done by starting the created container image:\n\n```bash\ndocker run --rm -it --privileged forgejo-runner-dind\n```\n\n### Running a minimal container\n\nFor testing it can be useful to run a minimal container.\n\n```bash\ndocker run -it --rm --privileged --name forgejo-runner-2 \\\n      --network forgejo-overlay \\\n      -v /opt/appdata/forgejo/runner2:/config \\\n      -e CONFIG_FILE=/config/config.yaml \\\n      alex3305/forgejo-runner-dind:latest\n```\n\nWhere I have copied my primary runner configuration to test with. It is required to stop the primary Forgejo runner when doing so.\n\n\u003e [!TIP]\n\u003e Bash is available and can be used as an entrypoint\n\n### Logging\n\nIt is advised to use trace or debug logging set in the configuration file for debugging.\n\n```yaml\nlog:\n  # The level of logging, can be trace, debug, info, warn, error, fatal\n  level: trace\n  job_level: trace\n```\n\n## License\n\nThis repository is licensed under the [MIT License](LICENSE.md) unless otherwise stated.\n\nDocker and the Docker logo are trademarks or registered trademarks of Docker, Inc.\n\nThe Forgejo branding is licensed under the [Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/) license. \n\nGitea is a trademark or registered trademark of Gitea Ltd. The Gitea logo is licensed under the [MIT License](https://github.com/go-gitea/gitea/blob/main/LICENSE). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex3305%2Fforgejo-runner-dind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex3305%2Fforgejo-runner-dind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex3305%2Fforgejo-runner-dind/lists"}