• docker安装


    系统:centos7(可以升级一下内核)

    以下是几个镜像网站:

      https://hub.docker.com/
      https://quay.io/
      https://dev.aliyun.com/search.html

    1、获取repo文件

      cd /etc/yum.repos.d/
      wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo

    以下是docker-ce.repo文件内容:

    [docker-ce-stable]
    name=Docker CE Stable - $basearch
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/7/$basearch/stable
    enabled=1
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-stable-debuginfo]
    name=Docker CE Stable - Debuginfo $basearch
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/debug-$basearch/stable
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-stable-source]
    name=Docker CE Stable - Sources
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/source/stable
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-edge]
    name=Docker CE Edge - $basearch
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/$basearch/edge
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-edge-debuginfo]
    name=Docker CE Edge - Debuginfo $basearch
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/debug-$basearch/edge
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-edge-source]
    name=Docker CE Edge - Sources
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/source/edge
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-test]
    name=Docker CE Test - $basearch
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/$basearch/test
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-test-debuginfo]
    name=Docker CE Test - Debuginfo $basearch
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/debug-$basearch/test
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-test-source]
    name=Docker CE Test - Sources
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/source/test
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-nightly]
    name=Docker CE Nightly - $basearch
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/$basearch/nightly
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-nightly-debuginfo]
    name=Docker CE Nightly - Debuginfo $basearch
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/debug-$basearch/nightly
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

    [docker-ce-nightly-source]
    name=Docker CE Nightly - Sources
    baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/centos/7/source/nightly
    enabled=0
    gpgcheck=1
    gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/gpg

      

    2、安装

      yum install docker-ce

    3、配置文件

      docker-ce配置文件: /etc/docker/daemon.json

      docker镜像加速:
        docker cn
        阿里云加速
        中国科技大学

      

      vim /etc/docker/daemon.json
      {
      "registry-mirrors": ["https://registry.docker-cn.com"]
      }

    4、启动

      systemctl start docker.service
      systemctl enable docker.service
      ps -ef |grep docker

  • 相关阅读:
    做汉堡
    作业2结对子
    软件开发流程阅读《构建之法》 第5.5 第6 第7章
    自动生成四则运算
    修改过的四则运算
    【暴力DP】[Dota1004]受折磨的灵魂(TormentedSoul)
    【Blog】Start My Journey In Cnblogs!
    【DP+ShortPath】[Dota1000]德鲁伊(Dyrad)
    【Watery DP】[Dota1002]光之守卫(Gandolf)
    【DP】[Dota1003]育母蜘蛛(BroodMother)
  • 原文地址:https://www.cnblogs.com/weiyiming007/p/10457886.html
Copyright © 2020-2023  润新知