参照官方教程执行
https://docs.docker.com/engine/install/centos/
1、当执行到下面的命令时,注意替换规则
sudo yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-compose-plugin sudo yum install docker-ce-18.09.1 docker-ce-cli-18.09.1 containerd.io docker-compose-plugin
2、docker compose 安装
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose docker compose --version
3、如果要执行docker compose的相关命令,不要用docker-compose.
标签:compose,centos,配置,ce,install,docker,sudo From: https://www.cnblogs.com/clayyjh/p/16841041.html