美文网首页
Docker中安装Docker------ubuntu

Docker中安装Docker------ubuntu

作者: 伐无道 | 来源:发表于2019-10-23 20:52 被阅读0次

    今天有个需求,需要使用jenkins部署docker项目,由于我们的jenkins就是用docker部署的,所以jenkins本身所在的系统同就是精简版的。查了一番,终于安装成功。

    1. 备份文件

      mv /etc/apt/sources.list /etc/apt/sources.list.bakup
      
    2. 切换源

      sudo vim /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
      
      # 预发布软件源,不建议启用
      # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
      # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
      

    3. 刷新

    apt-get update
    

    4. docker一键安装

        curl -sSL https://get.daocloud.io/docker | sh
    

    参考:https://blog.csdn.net/wang_shen_tao/article/details/78676560

    相关文章

      网友评论

          本文标题:Docker中安装Docker------ubuntu

          本文链接:https://www.haomeiwen.com/subject/qfhlvctx.html