1
0
Fork 0

Use sockets for dind

This commit is contained in:
Sergio Talens-Oliag 2025-03-13 15:05:50 +01:00
parent db2cf92b9f
commit d51275e28f
Signed by: sto
GPG key ID: 821AEE0FD167FBDF
2 changed files with 6 additions and 2 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
data/
dind/

View file

@ -3,8 +3,10 @@ services:
image: docker:dind
container_name: 'dind'
privileged: 'true'
command: ['dockerd', '-H', 'tcp://0.0.0.0:2375', '--tls=false']
command: ['dockerd', '-H', 'unix:///dind/docker.sock', '-G', '$RUNNER_GID']
restart: 'unless-stopped'
volumes:
- ./dind:/dind
runner:
image: 'data.forgejo.org/forgejo/runner:6.2.2'
@ -15,9 +17,10 @@ services:
condition: service_started
container_name: 'runner'
environment:
DOCKER_HOST: tcp://dind:2375
DOCKER_HOST: 'unix:///dind/docker.sock'
user: $RUNNER_UID:$RUNNER_GID
volumes:
- ./data:/data
- ./dind:/dind
restart: 'unless-stopped'
command: '/bin/sh -c "sleep 5; forgejo-runner daemon"'