linux下docker和docker-compose的安装与使用

1.安装依赖包

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

2.设置阿里云镜像源

sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

3.安装docker-ce

sudo yum install docker-ce

4.设置开机启动docker-ce

sudo systemctl enable docker
sudo systemctl start docker

5.安装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

 

linux下docker和docker-compose的安装与使用

上一篇:CISCO ASA防火墙Failover+multiple context详细部署--By 年糕泰迪


下一篇:Linux 之 CentOS 7 换yum源(阿里源)