diff options
author | Michael Gugino <mgugino@redhat.com> | 2018-01-02 11:21:34 -0500 |
---|---|---|
committer | Michael Gugino <mgugino@redhat.com> | 2018-01-02 11:48:17 -0500 |
commit | b6cfba63633a10446f8d08af988648af5e997341 (patch) | |
tree | 27e65c1b3a2003d12d221ee420d8cbe86f5fbb6f /roles/openshift_node | |
parent | cc3a0b463c9903af6664d0a978bae530c486d991 (diff) | |
download | openshift-b6cfba63633a10446f8d08af988648af5e997341.tar.gz openshift-b6cfba63633a10446f8d08af988648af5e997341.tar.bz2 openshift-b6cfba63633a10446f8d08af988648af5e997341.tar.xz openshift-b6cfba63633a10446f8d08af988648af5e997341.zip |
Add docker auth credentials to system container install
This commit adds docker auth credentials mount to
system container systemd unit file.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1514324
Diffstat (limited to 'roles/openshift_node')
-rw-r--r-- | roles/openshift_node/templates/openshift.docker.node.dep.service | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/roles/openshift_node/templates/openshift.docker.node.dep.service b/roles/openshift_node/templates/openshift.docker.node.dep.service index 8b43beb07..873744f34 100644 --- a/roles/openshift_node/templates/openshift.docker.node.dep.service +++ b/roles/openshift_node/templates/openshift.docker.node.dep.service @@ -6,6 +6,12 @@ Before={{ openshift_service_type }}-node.service {% if openshift_use_crio %}Wants=cri-o.service{% endif %} [Service] -ExecStart=/bin/bash -c "if [[ -f /usr/bin/docker-current ]]; then echo \"DOCKER_ADDTL_BIND_MOUNTS=--volume=/usr/bin/docker-current:/usr/bin/docker-current:ro --volume=/etc/sysconfig/docker:/etc/sysconfig/docker:ro --volume=/etc/containers/registries:/etc/containers/registries:ro\" > /etc/sysconfig/{{ openshift_service_type }}-node-dep; else echo \"#DOCKER_ADDTL_BIND_MOUNTS=\" > /etc/sysconfig/{{ openshift_service_type }}-node-dep; fi" +ExecStart=/bin/bash -c 'if [[ -f /usr/bin/docker-current ]]; \ + then echo DOCKER_ADDTL_BIND_MOUNTS=\"--volume=/usr/bin/docker-current:/usr/bin/docker-current:ro \ + --volume=/etc/sysconfig/docker:/etc/sysconfig/docker:ro \ + --volume=/etc/containers/registries:/etc/containers/registries:ro \ + {% if l_bind_docker_reg_auth %} --volume={{ oreg_auth_credentials_path }}:/root/.docker:ro{% endif %}\" > \ + /etc/sysconfig/{{ openshift_service_type }}-node-dep; \ + else echo "#DOCKER_ADDTL_BIND_MOUNTS=" > /etc/sysconfig/{{ openshift_service_type }}-node-dep; fi' ExecStop= SyslogIdentifier={{ openshift_service_type }}-node-dep |