2 if apt --version 2>1 >/dev/null; then
3 sudo chmod +r /boot/vmlinuz*
4 if ! docker --version 2>1 >/dev/null; then
6 sudo apt install -y apt-transport-https ca-certificates curl software-properties-common rename
7 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
8 sudo add-apt-repository -y "deb http://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
10 sudo apt install -y docker-ce
13 sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
14 sudo yum -y install docker-ce docker-ce-cli containerd.io
16 sudo mkdir -p /etc/docker/
17 echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
18 sudo systemctl start docker
19 # Ugly hack to make docker usable for non-root
20 # (adding to the group would require re-login)
21 sudo chmod 777 /var/run/docker.sock