一、安装Docker

  1. curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
  2. sudo systemctl start docker //启动docker
  3. docker -v //查看版本号
  4. docker info //查看docker详情

、docker镜像加速

00.png
01.png

  1. vi /etc/docker/daemon.json
  2. {
  3. "registry-mirrors": ["https://0cec187b820010c90f58c00bf2f1d6a0.mirror.swr.myhuaweicloud.com"]
  4. }
  1. sudo systemctl daemon-reload
  2. sudo systemctl restart docker

三、卸载docker

  1. # 查询安装的docker包 
  2. yum list installed | grep docker
  3. yum remove docker-ce.x86_64 ddocker-ce-cli.x86_64 -y
  4. rm -rf /var/lib/docker

、docker-compose

  1. 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
  1. sudo chmod +x /usr/local/bin/docker-compose