centos 7 安装docker 并设置阿里云镜像仓库

前端之家收集整理的这篇文章主要介绍了centos 7 安装docker 并设置阿里云镜像仓库前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

标题2

  1. step 1: 安装必要的一些系统工具
  2. sudo apt-get update
  3. sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
  4. # step 2: 安装GPG证书
  5. curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
  6. # Step 3: 写入软件源信息
  7. sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
  8. # Step 4: 更新并安装 Docker-CE
  9. sudo apt-get -y update
  10. sudo apt-get -y install docker-ce

标题3

所需引用标题

centos 7 安装docker 并设置阿里云镜像仓库
Ubuntu 14.04 16.04 (使用apt-get进行安装)

CentOS 7 (使用yum进行安装)

  1. 羊羊羊
  2. 仙仙仙
  3. 蘑菇哥

标题1


  1. # vim /etc/yum.repos.d/docker-ee.repo
  2. # 将 [docker-ce-test] 下方的 enabled=0 修改为 enabled=1
  3. #
  4. # 安装指定版本的Docker-CE:
  5. # Step 1: 查找Docker-CE的版本:
  6. # yum list docker-ce.x86_64 --showduplicates | sort -r
  7. # Loading mirror speeds from cached hostfile
  8. # Loaded plugins: branch,fastestmirror,langpacks
  9. # docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
  10. # docker-ce.x86_64 17.03.1.ce-1.el7.centos @docker-ce-stable
  11. # docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
  12. # Available Packages
  13. # Step2 : 安装指定版本的Docker-CE: (VERSION 例如上面的 17.03.0.ce.1-1.el7.centos)
  14. # sudo yum -y install docker-ce-[VERSION]

上面的问题只是做一个案例说明

  1. sudo mkdir -p /etc/docker
  2. sudo tee /etc/docker/daemon.json <<-'EOF'
  3. {
  4. "registry-mirrors": ["https://uxk0ognt.mirror.aliyuncs.com"]
  5. }
  6. EOF
  7. sudo systemctl daemon-reload
  8. sudo systemctl restart docker

案例说明2我是一个粉刷匠粉刷本领强,我要把那大房子刷的很漂亮,我是一个粉刷匠粉刷本领强,我要把那大房子刷的很漂亮,我是一个粉刷匠粉刷本领强,我要把那大房子刷的很漂亮,我是一个粉刷匠粉刷本领强,我要把那大房子刷的很漂亮,

猜你在找的CentOS相关文章