Merge "Nova-libvirt needs to bind to /sys/fs/cgroup"
[apex-tripleo-heat-templates.git] / docker / firstboot / start_docker_agents.sh
index cb7c57f..a0e95d1 100644 (file)
@@ -38,7 +38,9 @@ EOF
 #echo "ADD_REGISTRY='--registry-mirror $docker_registry'" >> /etc/sysconfig/docker
 
 # Local docker registry 1.8
-#/bin/sed -i s/ADD_REGISTRY/#ADD_REGISTRY/ /etc/sysconfig/docker
+if [ $docker_namespace_is_registry ]; then
+    /bin/sed -i "s/# INSECURE_REGISTRY='--insecure-registry '/INSECURE_REGISTRY='--insecure-registry $docker_registry'/g" /etc/sysconfig/docker
+fi
 
 /sbin/setenforce 0
 /sbin/modprobe ebtables
@@ -49,9 +51,10 @@ echo nameserver 8.8.8.8 > /etc/resolv.conf
 HOSTNAME=$(hostname)
 echo "127.0.0.1 $HOSTNAME.localdomain $HOSTNAME" >> /etc/hosts
 
-# Another hack.. we need latest docker..
+# Another hack.. we need a different docker version
+# (should obviously be dropped once the atomic image contains docker 1.8.2)
 /usr/bin/systemctl stop docker.service
-/bin/curl -o /tmp/docker https://get.docker.com/builds/Linux/x86_64/docker-latest
+/bin/curl -o /tmp/docker https://get.docker.com/builds/Linux/x86_64/docker-1.8.2
 /bin/mount -o remount,rw /usr
 /bin/rm /bin/docker
 /bin/cp /tmp/docker /bin/docker