44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
volumes:
|
|
docker_certs: {}
|
|
docker_data: {}
|
|
|
|
networks:
|
|
dind:
|
|
external: false
|
|
|
|
services:
|
|
docker-in-docker:
|
|
# image: code.forgejo.org/oci/docker:dind
|
|
image: code.forgejo.org/oci/docker@sha256:bb26df3a28c1613fb0c554e911bf9c54f26afe134b07e049f28ec0d8f06fb4da
|
|
container_name: forgejo_runner_bm_dind
|
|
restart: unless-stopped
|
|
hostname: docker # Must set hostname as TLS certificates are only valid for docker or localhost
|
|
privileged: true
|
|
networks:
|
|
- dind
|
|
environment:
|
|
DOCKER_TLS_CERTDIR: /certs
|
|
DOCKER_HOST: docker-in-docker
|
|
volumes:
|
|
- docker_certs:/certs
|
|
- docker_data:/var/lib/docker
|
|
|
|
runner:
|
|
# image: code.forgejo.org/forgejo/runner:3.5.1
|
|
image: code.forgejo.org/forgejo/runner@sha256:c6b28f34f0c23a44468e5f3284e0c9be144878de57f1a55d39014a7b3f8dfffe
|
|
container_name: forgejo_runner_bm
|
|
restart: unless-stopped
|
|
networks:
|
|
- dind
|
|
depends_on:
|
|
- docker-in-docker
|
|
environment:
|
|
DOCKER_HOST: tcp://docker:2376
|
|
DOCKER_CERT_PATH: /certs/client
|
|
DOCKER_TLS_VERIFY: "1"
|
|
volumes:
|
|
- ./runner-data:/data:z
|
|
- docker_certs:/certs
|
|
command: >-
|
|
bash -c ' while : ; do test -w .runner && forgejo-runner --config config.yml daemon ; sleep 10 ; done '
|
|
|