zoukankan      html  css  js  c++  java
  • Ubuntu18.04 安装Docker【转】

    转自:https://www.cnblogs.com/tangzz/p/11950126.html

     1.sudo apt-get remove docker.io docker-engine

    2.sudo apt-get update

    3.$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

    4.# 官方源 $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - # 中科大源

    $ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add - # 清华源

    $ curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

    # 检查秘钥是否安装成功

    $ sudo apt-key fingerprint 0EBFCD88

    5.# 官方源 $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

    # 中科大源 $ sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

    # 清华源 $ sudo add-apt-repository "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

    6.$ sudo apt-get update

    $ sudo apt-get install docker-ce docker-ce-cli containerd.io

    # 检查是否安装完成

    $ sudo docker run hello-world

    7.$ sudo usermod -aG docker username

    8.$ sudo mkdir -p /etc/docker $ sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": [ "https://1nj0zren.mirror.aliyuncs.com", "https://docker.mirrors.ustc.edu.cn", "http://f1361db2.m.daocloud.io", "https://registry.docker-cn.com" ] } EOF

    9.$ sudo systemctl daemon-reload

    $ sudo systemctl restart docker

  • 相关阅读:
    51NOD 1069 Nim游戏
    51NOD 1066 Bash游戏
    51NOD 1058 N的阶乘的长度
    51NOD 1057 N的阶乘
    51NOD 1027 大数乘法
    RMQ 区间最大值 最小值查询
    Codeforces Round #426 (Div. 2) C. The Meaningless Game
    51NOD 1046 A^B Mod C
    OJ上 编译器 G++和C++的区别
    二分暑假专题 训练记录 2017-7-29
  • 原文地址:https://www.cnblogs.com/summer1019/p/13385160.html
Copyright © 2011-2022 走看看