Centos7安装docker-ce docker-compose

安装依赖

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

添加源

 yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

安装

yum install docker-ce

启用&启动

systemctl enable docker
systemctl daemon-reload
systemctl start docker

安装docker-compose

curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose

添加国内镜像

vi /etc/docker/daemon.json
{
  "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
}
systemctl restart docker

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Captcha Code