Gitea: run act_runner using DIND
This commit is contained in:
parent
c7304784b9
commit
afe92e9595
@ -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
|
@ -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
|
||||
name: IPv4
|
||||
|
||||
# DinD containers cannot resolve *.github.com unless daemon.json is mounted
|
||||
# https://gitea.com/gitea/act_runner/issues/381#issuecomment-755182
|
@ -1,10 +1,10 @@
|
||||
setup:
|
||||
oracle4:
|
||||
- caddy
|
||||
oracle3:
|
||||
- runner
|
||||
|
||||
compose:
|
||||
oracle4:
|
||||
- caddy
|
||||
oracle3:
|
||||
- runner
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user