zoukankan      html  css  js  c++  java
  • linux安装docker

    一、官方安装方法

      1、 centos7的安装方法

        1) 安装yum-utils

     $ sudo yum install yum-utils device-mapper-persistent-data lvm2 –y
     
     $ sudo yum-config-manager 
       --add-repo 
        https://download.docker.com/linux/centos/docker-ce.repo
    

        2) 安装docker

     $ sudo yum makecache fast
    $ sudo yum install docker-ce -y

        3) 启动docker

    $ sudo systemctl start docker
    
    $ sudo systemctl enable docker
    

      2、 ubuntu16的安装方法

        1) 更新安装包index

    $ sudo apt-get update

        2) docker允许https使用registry库

     $ sudo apt-get install 
         apt-transport-https 
         ca-certificates 
         curl 
         software-properties-common

        3) 添加docker的官方GPG key

     $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

        4) 安装docker

     $ 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 -y   

    二、更方便的安装方法

    方法来自  http://get.daocloud.io

    # 高速安装docker
    
    $ sudo curl -sSL https://get.daocloud.io/docker | sh
    
    # 此方法适用于ubuntu,centos等大部分linux,会3小时同步一次docker官方资源

    官方安装方法:https://docs.docker.com/engine/installation/linux/

  • 相关阅读:
    Linux vim的四中模式
    Linux 打包压缩解压缩
    Linux 写入查看文本
    Linux 文件复制和移动
    Linux 创建删除目录
    Linux cd命令
    vim 文本替换
    linux工作中使用命令
    is 和 == 的区别
    再次复习python
  • 原文地址:https://www.cnblogs.com/jefflee168/p/7381679.html
Copyright © 2011-2022 走看看