From 08985a0d79acc90c0711b466950529ba79eff5de Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Fri, 29 Jul 2016 17:26:49 +0800 Subject: [PATCH] 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 --- tools/setup_RedHat.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/setup_RedHat.sh b/tools/setup_RedHat.sh index be4b3ec325..f9e6a4fe36 100755 --- a/tools/setup_RedHat.sh +++ b/tools/setup_RedHat.sh @@ -49,8 +49,14 @@ sudo yum -y install libffi-devel openssl-devel docker-engine btrfs-progs setup_disk # Setup Docker -sudo sed -i -r 's,(ExecStart)=(.+),\1=/usr/bin/docker daemon --storage-driver btrfs,' /usr/lib/systemd/system/docker.service -sudo sed -i 's|^MountFlags=.*|MountFlags=shared|' /usr/lib/systemd/system/docker.service +sudo mkdir /etc/systemd/system/docker.service.d +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 start docker