Skip to content

Instantly share code, notes, and snippets.

@zlocate
Created July 25, 2020 08:34
Show Gist options
  • Save zlocate/19ae64fbb1630ef7b2db5e41f0718be4 to your computer and use it in GitHub Desktop.
Save zlocate/19ae64fbb1630ef7b2db5e41f0718be4 to your computer and use it in GitHub Desktop.
!/bin/bash
# Installs docker-ce, enable and running service (working with Debian, Ubuntu, Centos)
URL="https://get.docker.com"
# Run installation script
sudo bash <(curl -s $URL)
# Add current user to docker group (it's insecure because it give ability to escalate permissions to root)
# Do not use it in production (check rootless mode)
sudo usermod -aG docker ${whoami}
# Enable (sets to autostart)
sudo systemctl docker enable
# Run service
sudo systemctl docker start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment