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

  • 相关阅读:
    Linux 守护进程一
    Linux 改进捕捉信号机制(sigaction,sigqueue)
    Linux 发送信号
    Linux 信号捕捉
    Heartbeat+DRBD+MFS高可用
    centos7 MFS drbd keepalived
    RabbitMQ-官方指南-RabbitMQ配置
    CentOS 7 单用户模式+救援模式
    CentOS6.8 x64+Nginx1.3.8/Apache-httpd 2.4.3+PHP5.4.8(php-fpm)+MySQL5.5.28+CoreSeek4.1源码编译安装
    nginx定制header返回信息模块ngx_headers_more
  • 原文地址:https://www.cnblogs.com/summer1019/p/13385160.html
Copyright © 2011-2022 走看看