Fix sudo cat Permission denied error

Last commit [0], using sudo cat, this will gievs the error:
/etc/systemd/system/docker.service.d/docker.conf: Permission denied

This patch will fix this.

[0]: I2154919c394e546edac56934c8860d4177fc9603

Change-Id: I87a8b7397d2dad2d26eac9a020d5ea3b21645aa2
This commit is contained in:
zhurong 2017-03-07 21:58:44 +08:00
parent ce2d8fce33
commit f925296126

View File

@ -142,11 +142,11 @@ function install_docker {
sudo sed -i '/^ExecStart=/cExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:'$(echo $DOCKER_REMOTE_API_PORT)'' /lib/systemd/system/docker.service
else
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo cat > /etc/systemd/system/docker.service.d/docker.conf << EOF
sudo sh -c "cat > /etc/systemd/system/docker.service.d/docker.conf << EOF
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:$DOCKER_REMOTE_API_PORT
EOF
EOF"
fi
sudo systemctl daemon-reload
sudo systemctl restart docker