完全にメモ。

sudo yum update -y
sudo yum upgrade -y

# docker
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
sudo yum install -y docker-ce docker-ce-cli containerd.io

sudo usermod -aG docker $USER
sudo gpasswd -a $USER docker

sudo systemctl start docker
sudo systemctl enable docker

# docker-compose
sudo yum install -y wget
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
sudo chmod +x /usr/local/bin/docker-compose

# あと要らない解凍ファイルとか消す。
# 再起動

https://docs.docker.com/compose/install/