// 系統更新
dnf update -y
或
yum update -y
// 加入docker的repo
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
或
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
// 安裝docker-ce
dnf install docker-ce --nobest
或
yum install docker-ce
// 啟動docker
systemctl start docker
// 自動啟動docker
systemctl enable docker
// 觀察docker的版本
docker --version
// 安裝curl套件
dnf install curl
或
yum install curl
// 安裝docker compose
curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
// 修改docker-compose的權限
chmod 755 /usr/local/bin/docker-compose
// 建立docker-compose的軟連結,aaPanel即可正常讀取
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
// 觀察docker-compose的版本
docker-compose --version
// 參考自:
https://www.tutsmake.com/how-to-install-docker-and-compose-on-centos-8/#:~:text=How%20to%20Install%20Docker%20and%20Compose%20on%20CentOS,7%20Step%207%20%E2%80%93%20Uninstallation%20Docker%20Compose%20