Centos8 安装docker和docker-compose
安装依赖
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
添加docker源
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
安装docker社区版
sudo yum install docker-ce
启动docker服务
sudo systemctl start docker
启动docker服务
sudo systemctl start docker
设置docker开机自启
sudo systemctl enable docker
docker-compose安装
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose