aboutsummaryrefslogtreecommitdiffstats
path: root/docker/firstboot/start_docker_agents.sh
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@redhat.com>2016-01-08 12:20:53 -0500
committerJeff Peeler <jpeeler@redhat.com>2016-02-12 15:35:03 -0500
commit255f4fd69e6bdf8247bc2861fa830859fffbef33 (patch)
tree53df462d373c69b05a22703e597ffe6762302315 /docker/firstboot/start_docker_agents.sh
parent8d763fc70c33695a4752b04656d3904561cc19f3 (diff)
Minor fixes to allow local docker registry usage
Changed the heat-docker-agents namespace to use the namespacing specified in the environment file, which reduces modifications required on the user when using a local registry. Changed the start agents script to handle using a local registry both with a namespace and without. Change-Id: I16cc96b7ecddeeda07de45f50ffc6a880dabbba6
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 a0e95d1..2b03b96 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