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

  • 相关阅读:
    2019牛客暑期多校训练营(第三场)B题、H题
    2019牛客暑期多校训练营(第四场)k题、j题
    Manacher算法 & Palindrome
    HDU 3336——Count the string
    判断一个点是否在三角形内
    P1052 过河
    P1353 [USACO08JAN]跑步Running
    hdu 1686 Oulipo
    Cyclic Nacklace HDU
    高精地图技术分析
  • 原文地址:https://www.cnblogs.com/summer1019/p/13385160.html
Copyright © 2011-2022 走看看