Skip to content

Commit bddd167

Browse files
committed
Use Docker Hub proxy in docker:dind
1 parent 134e4ea commit bddd167

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

build/template/runner.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
docker-pull-policy: 'if-not-present'
2222
docker-privileged: 'true'
2323
docker-image: 'ruby:2.5'
24-
docker-volumes: '/certs/client'
24+
docker-volumes:
25+
- '/certs/client'
26+
- '/etc/gitlab-runner-custom/docker.json:{{ daemon_json }}:ro'
2527

2628
tasks:
2729
- block:
@@ -62,6 +64,15 @@
6264
dest: '{{ daemon_json }}'
6365
backup: yes
6466
notify: restart docker daemon
67+
- name: create docker daemon config for docker-in-docker
68+
vars:
69+
config:
70+
registry-mirrors:
71+
- 'http://{{ gateway_ip }}:5000'
72+
copy:
73+
content: |
74+
{{ config|to_nice_json }}
75+
dest: /etc/gitlab-runner-custom/docker.json
6576

6677
- name: verify gitlab-runner health after startup
6778
copy:

0 commit comments

Comments
 (0)