Dear gitea Community,
I’m trying to setup gitea + act_runner in a dockerized environment via docker-compose.
Detting up gitea itself was a breeze and it works some out of the box.
Unfortunately this is not true for actions/act_runner. Altough I tried hard to find a solution, there is not so much written about it (yet).
The issue I’m facing is, that the act_runner container doesn’t start or to be more precise stops with following msg:
runner-1 | time="2024-02-21T14:13:39Z" level=info msg="Starting runner daemon"
runner-1 | time="2024-02-21T14:13:39Z" level=error msg="fail to invoke Declare" error="unavailable: dial tcp: lookup server on 127.0.0.11:53: no such host"
runner-1 | Error: unavailable: dial tcp: lookup server on 127.0.0.11:53: no such host
runner-1 exited with code 1
I tried already various things (config, docker-settings, etc.), but nothing really helped.
I assume you will need some details about my setup.
It is based on a debian bookwork server.
Docker Version:
Docker version 25.0.3, build 4debf41
This is my docker-compose.yml file:
version: "3"
services:
gitserver:
image: gitea/gitea:1.21.4-rootless
hostname: gitserver
restart: unless-stopped
user: "1001"
volumes:
- ./data:/var/lib/gitea
- ./config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "80:80"
- "443:443"
- "2222:2222"
networks:
- gitea_network
runner:
image: gitea/act_runner:latest
hostname: runner
environment:
CONFIG_FILE: /act_runner_config.yaml
TZ: "Europe/Berlin"
GITEA_INSTANCE_URL: "https://gitserver/"
GITEA_RUNNER_REGISTRATION_TOKEN: "XXXXXXXXXXXXXXXXXX"
GITEA_RUNNER_NAME: "Act-Runner"
#GITEA_RUNNER_LABELS: "default"
depends_on:
- gitserver
links:
- "gitserver:gitserver"
volumes:
- ./config/config.yaml:/config.yaml
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
- "gitea_network"
networks:
gitea_network:
external: true
The network has been priorly created via
docker network create -d bridge gitea_network
As you can see, nothing special. Just a standard setup…
Your help is really appreciated.
It should be quite easy to replicate this setup.
Just create a project directory, create the necessary directories, copy & paste my docker-compose.yml…
Assuming you are on a *nix machine and have docker installed:
mkdir -p my_test_dir/{config,data}
cd my_test_dir
docker network create -d bridge gitea_network
touch docker-compose.yml # then copy my data above into it
docker compose up