Add user vagrant to group docker
The bootstrap script for Vagrant did not add the vagrant user to the docker group. That caused all docker commands, not executed with sudo, to fail. This commit adds the vagrant user to the docker group, which permits execution of docker commands without sudo. Change-Id: I56e6372c8b3a4559051f7be1a8fd7528dcbacc53 Closes-Bug: #1563405 Signed-off-by: Andrei-Lucian Șerb <lucian.serb@icloud.com>
This commit is contained in:
parent
7614e9d2a1
commit
60a5091c0c
@ -50,6 +50,10 @@ EOF
|
|||||||
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 -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
|
sed -i 's|^MountFlags=.*|MountFlags=shared|' /usr/lib/systemd/system/docker.service
|
||||||
|
|
||||||
|
# Add user vagrant to group docker
|
||||||
|
# This allows execution of docker commands without sudo
|
||||||
|
usermod -aG docker vagrant
|
||||||
|
|
||||||
# Start services
|
# Start services
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable docker
|
systemctl enable docker
|
||||||
|
Loading…
Reference in New Issue
Block a user