zoukankan      html  css  js  c++  java
  • ubuntu 16.04 跑 docker

    Ubuntu 的软件源配置文件是 /etc/apt/sources.list

    换国内的,不然会疯。下面是清华大学滴:

    # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

    然后reboot一下服务器。

    $ sudo apt-get update
    
    $ sudo apt-get install 
        apt-transport-https 
        ca-certificates 
        curl 
        software-properties-common
    
    $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    
    $ sudo apt-key fingerprint 0EBFCD88
    
    $ sudo add-apt-repository 
       "deb [arch=amd64] https://download.docker.com/linux/ubuntu 
       $(lsb_release -cs) 
       stable"
    
    $ sudo apt-get update
    
    $ sudo apt-get install docker-ce

    然后配置个docker加速器

    curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://xxxxxxxxx.m.daocloud.io

    然后根据提示,重新启动一下docker服务,输入docker info,就可以看到docker的情况啦~

  • 相关阅读:
    题解-CF1375E Inversion SwapSort
    寒门再难出贵子
    js获取链接中的内容方法
    MySQL添加用户、删除用户、授权及撤销权限
    Ubuntu保存退出vim编辑器
    最全!Linux服务器下安装SVN,并添加SVN项目,自动更新项目文件到web目录
    php $_SERVER中的SERVER_NAME 和HTTP_HOST的区别以及REQUEST_URI的讲解
    RESTful API 最佳实践----转载阮一峰
    PHP图像处理(GD库)
    nginx.conf配置
  • 原文地址:https://www.cnblogs.com/vincentzhou/p/8969900.html
Copyright © 2011-2022 走看看