Enable Docker on boot and start it

This commit is contained in:
Kris Lamoureux 2023-11-05 22:42:04 -05:00
parent 423e48f8ad
commit 1aa179b7bb
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925

View File

@ -11,6 +11,8 @@ set -xe
which curl &>/dev/null || (apt-get update && apt-get install -y curl)
which docker &>/dev/null || curl -fsSL https://get.docker.com | sh
[ ! "$(id -nG vagrant | grep -c docker)" -eq 1 ] && usermod -aG docker vagrant
systemctl enable docker
systemctl start docker
# Setup Docker Swarm
if [ ! "$(docker info | grep -c 'Swarm: active')" -eq 1 ]; then