zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    validFrom不通过submit按钮来触发表单验证
    微信小程序组件开发
    css3 单行文字溢出,多行文字溢出
    表格布局
    对象设置默认属性
    按钮样式
    判断一个json是否为空
    vue高仿饿了么(三)
    Win10 用IE打开网址默认跳转到Edge如何解决?
    VMware虚拟机安装Win11正式版
  • 原文地址:https://www.cnblogs.com/weiyiming007/p/10457886.html
Copyright © 2011-2022 走看看