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:
Andrei-Lucian Șerb 2016-03-29 18:59:08 +03:00
parent 7614e9d2a1
commit 60a5091c0c
1 changed files with 4 additions and 0 deletions

View File

@ -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 '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
systemctl daemon-reload
systemctl enable docker