aboutsummaryrefslogtreecommitdiffstats
path: root/docker/firstboot/start_docker_agents.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker/firstboot/start_docker_agents.sh')
-rw-r--r--docker/firstboot/start_docker_agents.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/docker/firstboot/start_docker_agents.sh b/docker/firstboot/start_docker_agents.sh
index a0e95d11..2b03b96e 100644
--- a/docker/firstboot/start_docker_agents.sh
+++ b/docker/firstboot/start_docker_agents.sh
@@ -39,7 +39,10 @@ EOF
# Local docker registry 1.8
if [ $docker_namespace_is_registry ]; then
- /bin/sed -i "s/# INSECURE_REGISTRY='--insecure-registry '/INSECURE_REGISTRY='--insecure-registry $docker_registry'/g" /etc/sysconfig/docker
+ # if namespace is used with local registry, trim all namespacing
+ trim_var=$docker_registry
+ registry_host="${trim_var%%/*}"
+ /bin/sed -i "s/# INSECURE_REGISTRY='--insecure-registry'/INSECURE_REGISTRY='--insecure-registry $registry_host'/g" /etc/sysconfig/docker
fi
/sbin/setenforce 0