zoukankan      html  css  js  c++  java
  • Linux环境安装Docker

    1. 使用APT安装

    # 更新数据源
    apt-get update
    # 安装所需依赖
    apt-get -y install apt-transport-https ca-certificates curl software-properties-common
    # 安装 GPG 证书
    curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
    # 新增数据源
    add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
    # 更新并安装 Docker CE
    apt-get update && apt-get install -y docker-ce

    # 验证是否安装成功
    docker version

    2. 配置Docker镜像加速器

    推荐使用阿里云 容器镜像加速器

    容器镜像加速器

    容器镜像加速器

    通过修改 daemon 配置文件 /etc/docker/daemon.json

     "registry-mirrors":["镜像加速器的加速地址"

    tee /etc/docker/daemon.json <<-'EOF'
    {
      "registry-mirrors": ["https://xxxxxxxx.mirror.aliyuncs.com"]
    }
    EOF
    
    # 重启 Docker
    systemctl daemon-reload
    systemctl restart docker
    
    # 验证配置是否成功
    docker info

    我的个人博客www.gofy.top

     

  • 相关阅读:
    封装
    魔术方法类与有关面向对象的关键字
    JS基础
    轮播效果
    进度条效果
    2018年6月
    2018年5月
    Monte Carlo tree search 学习
    2018年4月
    pachi 学习
  • 原文地址:https://www.cnblogs.com/gaofei200/p/12720256.html
Copyright © 2011-2022 走看看