Pulled from the docker website. Instructions are for Centos 7/8.
Set up the repo:
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Install docker:
sudo yum install docker-ce docker-ce-cli containerd.io
Enable and start docker:
sudo systemctl enable --now docker
Use docker as a non-root user:
sudo usermod -aG docker <username>
Log out and back in.
Install docker-compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Make docker-compose executable:
sudo chmod +x /usr/local/bin/docker-compose
Create a symbolic link to docker-compose:
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose