diff --git a/setups/setup-runner.yml b/setups/setup-runner.yml index 375b12f..8efe2dc 100644 --- a/setups/setup-runner.yml +++ b/setups/setup-runner.yml @@ -4,4 +4,12 @@ dest: "{{ docker_dir }}/runner/.runner" owner: 1000 group: 1000 + mode: 0755 + + - name: Set up Docker daemon configuration file to solve DNS problems + template: + src: "conf/daemon.json.j2" + dest: "{{ docker_dir }}/runner/daemon.json" + owner: 1000 + group: 1000 mode: 0755 \ No newline at end of file diff --git a/templates/compose/runner.yaml.j2 b/templates/compose/runner.yaml.j2 index fd6dfd9..1a7fe93 100755 --- a/templates/compose/runner.yaml.j2 +++ b/templates/compose/runner.yaml.j2 @@ -2,28 +2,31 @@ version: "3" services: runner: - image: gitea/act_runner:latest -# image: gitea/act_runner:latest-dind-rootless + image: gitea/act_runner:latest-dind-rootless container_name: runner restart: always privileged: true volumes: - {{ docker_dir }}/runner:/data - - /var/run/docker.sock:/var/run/docker.sock + - {{ docker_dir }}/runner/daemon.json:/home/rootless/.config/docker/daemon.json + - {{ docker_dir }}/runner/daemon.json:/etc/docker/daemon.json # security_opt: # - no-new-privileges environment: - PUID=1000 - PGID=1000 - TZ=Asia/Singapore -# - DOCKER_HOST={{ docker_host }} + - DOCKER_HOST={{ docker_host }} - GITEA_INSTANCE_URL=https://git.opnxng.com - - GITEA_RUNNER_REGISTRATION_TOKEN="{{ gitea_runner_registration_token }}" - GITEA_RUNNER_NAME=runner + - GITEA_RUNNER_REGISTRATION_TOKEN="{{ gitea_runner_registration_token }}" - GITEA_RUNNER_LABELS=ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye,ubuntu-20.04:docker://node:16-bullseye,ubuntu-18.04:docker://node:16-buster,runner:host networks: - IPv4 networks: IPv4: external: - name: IPv4 \ No newline at end of file + name: IPv4 + +# DinD containers cannot resolve *.github.com unless daemon.json is mounted +# https://gitea.com/gitea/act_runner/issues/381#issuecomment-755182 \ No newline at end of file diff --git a/vars/services.yml b/vars/services.yml index fbf8f00..41ff264 100644 --- a/vars/services.yml +++ b/vars/services.yml @@ -1,10 +1,10 @@ setup: - oracle4: - - caddy + oracle3: + - runner compose: - oracle4: - - caddy + oracle3: + - runner # ----------------------------------------------------------------------------------------------------