Last Updated: September 09, 2019
·
1.138K
· arosenhagen

install docker in a vagrant box

use this in your Vagrantfile to install lxc-docker

$docker = <<SCRIPT
wget -q -O - https://get.docker.io/gpg | apt-key add -
echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
apt-get update -qq
apt-get install -q -y --force-yes lxc-docker
usermod -a -G docker vagrant
docker version
su - vagrant -c 'echo alias d=docker >> ~/.bash_aliases'
SCRIPT

config.vm.provision "shell", inline: $docker