Use /etc file to overwrite the docker.service file

Docker engine is updated to 1.12. The docker.service in the rpm is
change. Use the /etc/systemd/system/docker.service.d/kolla.conf file to
overwrite the default parameters

TrivialFix

Change-Id: Ice56808f4a1ce1ee57bf5e48c779d033ea6c759c
This commit is contained in:
Jeffrey Zhang 2016-07-29 17:26:49 +08:00
parent c895034030
commit 08985a0d79

View File

@ -49,8 +49,14 @@ sudo yum -y install libffi-devel openssl-devel docker-engine btrfs-progs
setup_disk setup_disk
# Setup Docker # Setup Docker
sudo sed -i -r 's,(ExecStart)=(.+),\1=/usr/bin/docker daemon --storage-driver btrfs,' /usr/lib/systemd/system/docker.service sudo mkdir /etc/systemd/system/docker.service.d
sudo sed -i 's|^MountFlags=.*|MountFlags=shared|' /usr/lib/systemd/system/docker.service sudo tee /etc/systemd/system/docker.service.d/kolla.conf << EOF
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --storage-driver btrfs
MountFlags=shared
EOF
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl start docker sudo systemctl start docker