{"id":22937633,"url":"https://github.com/vegardit/docker-gitea-act-runner","last_synced_at":"2025-04-04T18:04:26.007Z","repository":{"id":152608480,"uuid":"616963224","full_name":"vegardit/docker-gitea-act-runner","owner":"vegardit","description":"Docker image based on debian:stable-slim to run Gitea's act_runner as a Docker container","archived":false,"fork":false,"pushed_at":"2025-01-05T21:52:51.000Z","size":69,"stargazers_count":198,"open_issues_count":2,"forks_count":20,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-28T17:02:09.650Z","etag":null,"topics":["act-runner","docker-image","gitea","gitea-actions"],"latest_commit_sha":null,"homepage":"https://buymeacoffee.com/vegardit","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vegardit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2023-03-21T12:40:44.000Z","updated_at":"2025-03-27T10:59:09.000Z","dependencies_parsed_at":"2024-05-21T11:36:12.017Z","dependency_job_id":"c4ed01a0-d4ff-4cd6-a1ef-f75420da3c13","html_url":"https://github.com/vegardit/docker-gitea-act-runner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegardit%2Fdocker-gitea-act-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegardit%2Fdocker-gitea-act-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegardit%2Fdocker-gitea-act-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vegardit%2Fdocker-gitea-act-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vegardit","download_url":"https://codeload.github.com/vegardit/docker-gitea-act-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"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-runner","docker-image","gitea","gitea-actions"],"created_at":"2024-12-14T12:08:11.021Z","updated_at":"2025-04-04T18:04:25.986Z","avatar_url":"https://github.com/vegardit.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# vegardit/gitea-act-runner \u003ca href=\"https://github.com/vegardit/docker-gitea-act-runner/\" title=\"GitHub Repo\"\u003e\u003cimg height=\"30\" src=\"https://raw.githubusercontent.com/simple-icons/simple-icons/develop/icons/github.svg?sanitize=true\"\u003e\u003c/a\u003e\n\n[![Build Status](https://github.com/vegardit/docker-gitea-act-runner/workflows/Build/badge.svg \"GitHub Actions\")](https://github.com/vegardit/docker-gitea-act-runner/actions?query=workflow%3ABuild)\n[![License](https://img.shields.io/github/license/vegardit/docker-gitea-act-runner.svg?label=license)](#license)\n[![Docker Pulls](https://img.shields.io/docker/pulls/vegardit/gitea-act-runner.svg)](https://hub.docker.com/r/vegardit/gitea-act-runner)\n[![Docker Stars](https://img.shields.io/docker/stars/vegardit/gitea-act-runner.svg)](https://hub.docker.com/r/vegardit/gitea-act-runner)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.1%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)\n\n1. [What is it?](#what-is-it)\n1. [Usage](#usage)\n1. [License](#license)\n\n\n## \u003ca name=\"what-is-it\"\u003e\u003c/a\u003eWhat is it?\n\n`debian:stable-slim` based Docker image containing [Gitea](https://gitea.com)'s [act_runner](https://gitea.com/gitea/act_runner/)\n\n#### Why not using Alpine Linux?\n- musl-libc - Alpine's Greatest Weakness https://www.linkedin.com/pulse/musl-libc-alpines-greatest-weakness-rogan-lynch\n- Why I will never use Alpine Linux ever again https://martinheinz.dev/blog/92\n- Does Alpine have known DNS issue within Kubernetes? https://stackoverflow.com/questions/65181012/\n- Why is the Alpine Docker image over 50% slower than the Ubuntu image? https://superuser.com/questions/1219609/\n- Performance issue with alpine musl library https://unix.stackexchange.com/questions/729342/\n\n\n## \u003ca name=\"usage\"\u003e\u003c/a\u003eUsage\n\nThe docker image comes in three flavors:\n- `vegardit/gitea-act-runner:latest`: only contains the Gitea act_runner and executes workflows in containers of the docker engine running act_runner itself (DooD / Docker-out-of-Docker approach)\n- `vegardit/gitea-act-runner:dind-latest`: executes workflows using an embedded docker engine (DinD / Docker-in-Docker approach) providing better process isolation\n- `vegardit/gitea-act-runner:dind-rootless-latest`: executes workflows using an embedded docker engine (DinD / Docker-in-Docker approach) running the docker daemon as a non-root user [(Rootless mode)](https://docs.docker.com/engine/security/rootless/)\n\n### Docker Run\n\nRunning from the command line:\n\n- Docker-out-of-Docker approach\n   ```py\n     docker run \\\n       -e GITEA_INSTANCE_URL=https://gitea.example.com \\\n       -e GITEA_RUNNER_REGISTRATION_TOKEN=\u003cINSERT_TOKEN_HERE\u003e \\\n       --name gitea_act_runner \\\n       -v /var/run/docker.sock:/var/run/docker.sock:rw \\\n       vegardit/gitea-act-runner:latest\n   ```\n\n- Docker-in-Docker approach\n   ```py\n     docker run \\\n       -e GITEA_INSTANCE_URL=https://gitea.example.com \\\n       -e GITEA_RUNNER_REGISTRATION_TOKEN=\u003cINSERT_TOKEN_HERE\u003e \\\n       --name gitea_act_runner \\\n       --privileged\n       vegardit/gitea-act-runner:dind-latest\n   ```\n\n- Docker-in-Docker approach with Docker daemon running as a non-root user (Rootless mode)\n   ```py\n     docker run \\\n       -e GITEA_INSTANCE_URL=https://gitea.example.com \\\n       -e GITEA_RUNNER_REGISTRATION_TOKEN=\u003cINSERT_TOKEN_HERE\u003e \\\n       --name gitea_act_runner \\\n       --privileged\n       vegardit/gitea-act-runner:dind-rootless-latest\n   ```\n\n### Docker Compose\n\nExample `docker-compose.yml`:\n\n- Docker-out-of-Docker approach\n   ```yaml\n   # https://docs.docker.com/compose/compose-file/\n\n   services:\n\n     gitea_act_runner:\n       image: vegardit/gitea-act-runner:latest\n       #image: ghcr.io/vegardit/gitea-act-runner:latest\n       restart: always\n       volumes:\n         - /var/run/docker.sock:/var/run/docker.sock:rw\n         - /my/path/to/data/dir:/data:rw # the config file is located at /data/.runner and needs to survive container restarts\n       environment:\n         TZ: \"Europe/Berlin\"\n         # config parameters for initial runner registration:\n         GITEA_INSTANCE_URL: 'https://gitea.example.com' # required\n         GITEA_RUNNER_REGISTRATION_TOKEN_FILE: 'path/to/file' # one-time registration token, only required on first container start\n         # or: GITEA_RUNNER_REGISTRATION_TOKEN: '\u003cINSERT_TOKEN_HERE\u003e'\n   ```\n\n- Docker-in-Docker approach\n   ```yaml\n   # https://docs.docker.com/compose/compose-file/\n\n   services:\n\n     gitea_act_runner:\n       image: vegardit/gitea-act-runner:dind-latest\n       #image: ghcr.io/vegarditgitea-act-runner:dind-latest\n       privileged: true\n       restart: always\n       volumes:\n         - /my/path/to/data/dir:/data:rw # the config file is located at /data/.runner and needs to survive container restarts\n       environment:\n         TZ: \"Europe/Berlin\"\n         # config parameters for initial runner registration:\n         GITEA_INSTANCE_URL: 'https://gitea.example.com' # required\n         GITEA_RUNNER_REGISTRATION_TOKEN_FILE: 'path/to/file' # one-time registration token, only required on first container start\n         # or: GITEA_RUNNER_REGISTRATION_TOKEN: '\u003cINSERT_TOKEN_HERE\u003e'\n   ```\n\n### Additional environment variables\n\nThe following environment variables can be specified to further configure the service.\n\n#### Runner registration:\nName|Default Value|Description\n----|-------------|-----------\nGITEA_INSTANCE_INSECURE|`false`|It `true` don't verify the TLS certificate of the Gitea instance\nGITEA_RUNNER_NAME|`\u003cempty\u003e`|If not specified the container's hostname is used\nGITEA_RUNNER_REGISTRATION_FILE|`/data/.runner`|The JSON file that holds the result from the runner registration with the Gitea instance\nGITEA_RUNNER_REGISTRATION_TIMEOUT|`30`|In case of failure, registration is retried until this timeout in seconds is reached\nGITEA_RUNNER_REGISTRATION_RETRY_INTERVAL|`5`|Wait period in seconds between registration retries\n\n#### Runner runtime config:\n\nName|Default Value|Description\n----|-------------|-----------\nGITEA_RUNNER_CONFIG_TEMPLATE_FILE|`/opt/config.template.yaml`|Template to derive the effective config file from, see [image/config.template.yaml](image/config.template.yaml)\nGITEA_RUNNER_UID|`1000`|The UID of the Gitea runner process\nGITEA_RUNNER_GID|`1000`|The GID of the Gitea runner process\nGITEA_RUNNER_LOG_EFFECTIVE_CONFIG|`false`|If set to true logs the effective YAML configuration to stdout during startup.\n\n#### Runner config template variables\n\nThe following environment variables are referenced in the `/opt/config.template.yaml` file.\n\nName|Default Value|Description\n----|-------------|-----------\nGITEA_RUNNER_LABELS|`\u003cempty\u003e`|Comma-separated list of labels in the format of `label[:schema[:args]]`.\u003cbr\u003eIf not specified the following labels are used\u003col\u003e\u003cli\u003e`ubuntu-latest:docker://catthehacker/ubuntu:act-latest`\u003cli\u003e`ubuntu-24.04:docker://catthehacker/ubuntu:act-24.04\u003cli\u003e`ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04`\u003cli\u003e`ubuntu-20.04:docker://catthehacker/ubuntu:act-20.04`\u003c/ol\u003e\nGITEA_RUNNER_LOG_LEVEL|`info`|The level of logging, can be trace, debug, info, warn, error, fatal\nGITEA_RUNNER_ENV_FILE|`/data/.env`|Extra environment variables to run jobs from a file\nGITEA_RUNNER_FETCH_TIMEOUT|`5s`|The timeout for fetching the job from the Gitea instance\nGITEA_RUNNER_FETCH_INTERVAL|`2s`|The interval for fetching the job from the Gitea instance\nGITEA_RUNNER_MAX_PARALLEL_JOBS|`1`|Maximum number of concurrently executed jobs\nGITEA_RUNNER_JOB_CONTAINER_DOCKER_HOST|`\u003cempty\u003e`|If empty, the available docker host is located automatically. If set to `-`, the available docker host is located automatically, but the docker host won't be mounted to the job containers. If it's any other value, the specified docker host will be used.\nGITEA_RUNNER_JOB_CONTAINER_NETWORK|`bridge`|Docker network to use with job containers. Can be `bridge`, `host`, `none`, or the name of a custom network\nGITEA_RUNNER_JOB_CONTAINER_PRIVILEGED|`false`|Whether to run jobs in containers with privileged mode which is required for **Docker-in-Docker** aka **dind**\nGITEA_RUNNER_JOB_CONTAINER_OPTIONS|`\u003cempty\u003e`|Additional container launch options (eg, --add-host=my.gitea.url:host-gateway)\nGITEA_RUNNER_JOB_CONTAINER_WORKDIR_PARENT|`/workspace`|The parent directory of a job's working directory\nGITEA_RUNNER_JOB_CONTAINER_FORCE_PULL|`true`|Pull docker image(s) even if already present\nGITEA_RUNNER_JOB_CONTAINER_FORCE_REBUILD|`false`|Rebuild docker image(s) even if already present\nGITEA_RUNNER_JOB_TIMEOUT|`3h`|The maximum time a job can run before it is cancelled\nGITEA_RUNNER_SHUTDOWN_TIMEOUT|`0s`|The timeout for the runner to wait for running jobs to finish when shutting down\nGITEA_RUNNER_ENV_VAR_**N**_NAME|`\u003cempty\u003e`|Name of the **N**-th extra environment variable to be passed to Job containers, e.g. `GITEA_RUNNER_ENV_VAR_1_NAME=MY_AUTH_TOKEN`\nGITEA_RUNNER_ENV_VAR_**N**_VALUE|`\u003cempty\u003e`|Value of the **N**-th extra environment variable to be passed to Job containers, e.g. `GITEA_RUNNER_ENV_VAR_1_VALUE=SGVsbG8gbXkgZnJpZW5kIQ==`\nGITEA_RUNNER_VALID_VOLUME_**N**|`\u003cempty\u003e`|Volumes (including bind mounts) that are allowed to be mounted into job containers. [Glob syntax](https://github.com/gobwas/glob) is supported, e.g. `GITEA_RUNNER_VALID_VOLUME_1=/src/*.json`\nGITEA_RUNNER_HOST_WORKDIR_PARENT|`/data/cache/actions`|The parent directory of a job's working directory. (Path to cache cloned actions)\n\n#### Embedded cache server:\nName|Default Value|Description\n----|-------------|-----------\nACT_CACHE_SERVER_ENABLED|`true`| Enable the use of an embedded or external cache server with `actions/cache` in jobs\nACT_CACHE_SERVER_EXTERNAL_URL|`\u003cempty\u003e`|URL to an external cache server. If specified, act_runner will use this URL as the ACTIONS_CACHE_URL instead of starting an embedded server. The URL should end with \"/\".\nACT_CACHE_SERVER_DIR|`/data/cache/server`| The directory to store the cache data\nACT_CACHE_SERVER_HOST|`\u003cempty\u003e`| The IP address or hostname via which the job containers can reach the cache server. Leave empty for automatic detection\nACT_CACHE_SERVER_PORT|`0`|The TCP port of the cache server. `0` means to use a random, available port\n\n## \u003ca name=\"license\"\u003e\u003c/a\u003eLicense\n\nAll files in this repository are released under the [Apache License 2.0](LICENSE.txt).\n\nIndividual files contain the following tag instead of the full license text:\n```\nSPDX-License-Identifier: Apache-2.0\n```\n\nThis enables machine processing of license information based on the SPDX License Identifiers that are available here: https://spdx.org/licenses/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegardit%2Fdocker-gitea-act-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvegardit%2Fdocker-gitea-act-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvegardit%2Fdocker-gitea-act-runner/lists"}