Skip to content

Commit

Permalink
Added an option (on by default for new users) to have the vagrant use…
Browse files Browse the repository at this point in the history
…r added to the docker group
  • Loading branch information
lukewaite-intouch committed Apr 7, 2015
1 parent e374d5a commit dff527c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ Vagrant.configure("2") do |config|
# config.vm.provision "shell", path: "#{github_url}/scripts/vim.sh", args: github_url

# Provision Docker
# config.vm.provision "shell", path: "#{github_url}/scripts/docker.sh"

# config.vm.provision "shell", path: "#{github_url}/scripts/docker.sh", args: "permissions"

####
# Web Servers
Expand Down
10 changes: 10 additions & 0 deletions scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ sudo apt-get update
# Install Docker
# -qq implies -y --force-yes
sudo apt-get install -qq lxc-docker

# Make the vagrant user able to interact with docker without sudo
if [ ! -z "$1" ]; then
if [ "$1" == "permissions" ]; then
echo ">>> Adding vagrant user to docker group"

sudo usermod -a -G docker vagrant

fi # permissions
fi # arg check

0 comments on commit dff527c

Please sign in to comment.