Docker CE installation - saviovettoor/DevOps-wiki GitHub Wiki
]#yum install -y yum-utils device-mapper-persistent-data lvm2
]#yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
]#yum update -y
]#yum install docker-ce -y
]#systemctl enable docker && systemctl start docker && systemctl status docker
None docker user won't be able to execute any docker commands since /var/run/docker.sock permission for that user is not there
]#usermod -aG docker <user>
*logout and login
]#apt-get update
]#apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
Add the Docker GPG key and repo:
]#curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
]#apt-key fingerprint 0EBFCD88
]#add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Install Docker CE packages:
]#apt-get update
]#apt-get install -y docker-ce=5:18.09.5~3-0~ubuntu-bionic docker-ce-cli=5:18.09.5~3-0~ubuntu-bionic containerd.io
Give vagrant_user permission to run docker commands:
sudo usermod -a -G docker vagrant_user