Docker 教程-------安装

2021-03-18  本文已影响0人  单曲_循环

Introduction :

Environment :

Installation (text-based installer)

  1. Download docker-ce.repo
    wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo

  2. Change the sorce to TUNA
    sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo

  3. Installating
    yum makecache fast
    yum install docker-ce

  4. start service
    systemctl start docker

  5. Verify
    docker --version

  6. e.g
    docker run hello-world

If you've seen such this whitch means the docker have succeed run on you system.


image.png
  1. Some improvements

change the source
vim /etc/docker/daemon.json

{
  "registry-mirrors": [
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com"
  ]
}
上一篇 下一篇

猜你喜欢

热点阅读