How to setup docker on CentOS 8
- uninstall any old versions of docker-related packages:
sudo yum remove -y docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
- install necessary utils:
sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
- add docker-ce repo to yum config:
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
install docker (c)ommunity (e)dition:
sudo yum install -y docker-ce
ensure service runs after rebooting:
sudo system ctl start docker \ && sudo system ctl enable docker
allow user to interact with docker:
sudo usermod -aG docker <user>
log out & back in