Fix Vagrant provisioning with docker 1.10

docker 1.10 removed the -d flag in favor of "daemon". Also adjust
docker config to enable shared mount namespace.

Change-Id: I1583849d5e45b5040af0cdc9b29ad364d421685f
Related-Bug: #1543201
This commit is contained in:
Martin André 2016-02-09 14:36:38 +09:00
parent 1f95680a32
commit 3bcffb1656
1 changed files with 3 additions and 1 deletions

View File

@ -47,9 +47,11 @@ EOF
pip install docker-py
# Configure registry
sed -i -r "s,(ExecStart)=(.+),\1=/usr/bin/docker -d --insecure-registry ${REGISTRY} --registry-mirror=http://${REGISTRY}," /usr/lib/systemd/system/docker.service
sed -i -r "s|(ExecStart)=(.+)|\1=/usr/bin/docker daemon --insecure-registry ${REGISTRY} --registry-mirror=http://${REGISTRY}|" /usr/lib/systemd/system/docker.service
sed -i 's|^MountFlags=.*|MountFlags=shared|' /usr/lib/systemd/system/docker.service
# Start services
systemctl daemon-reload
systemctl enable docker
systemctl start docker
}