centos 7 docker

2019-07-17  本文已影响0人  lizilong007

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

# 国内用阿里的源

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

sudo yum install docker-ce -y

sudo usermod -aG docker $(whoami)

# 启动

sudo systemctl enable docker.service

sudo systemctl start docker.service

# 安装docker-compose

sudo yum install epel-release -y

sudo yum install -y python-pip

sudo pip install docker-compose

docker-compose version

# 添加国内源
sudo touch /etc/docker/daemon.json
sudo vi /etc/docker/daemon.json

{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}
上一篇下一篇

猜你喜欢

热点阅读