github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/scripts/vagrant-linux-priv-docker.sh (about) 1 #!/usr/bin/env bash 2 3 # Source: https://docs.docker.com/engine/install/ubuntu/ 4 5 # Add the Docker repository 6 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - 7 add-apt-repository \ 8 "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ 9 $(lsb_release -cs) \ 10 stable" 11 12 # Update with i386, Go and Docker 13 apt-get update 14 15 apt-get install -y docker-ce docker-ce-cli containerd.io 16 17 # Restart Docker in case it got upgraded 18 systemctl restart docker.service 19 20 # Ensure Docker can be used by vagrant user 21 usermod -aG docker vagrant