zoukankan      html  css  js  c++  java
  • 1-docker安装

       一、看官方地址选择平台,我的是centos7 系统

    https://docs.docker.com/install/linux/docker-ce/centos/
    

     二、安装依赖

    sudo yum install -y yum-utils device-mapper-persistent-data lvm2
    

     三、添加软件仓库,我们这⾥使⽤稳定版 Docker,执⾏下⾯命令添加 yum 仓库地址:

    sudo yum-config-manager 
    --add-repo 
    https://download.docker.com/linux/centos/docker-ce.repo
    

     四、然后直接安装即可:

    yum install docker-ce -y
    

       五、如果要安装指定的版本,可以使⽤ yum list 列出可⽤的版本:

    yum list docker-ce --showduplicates | sort -r
    
    docker-ce.x86_64            18.06.3.ce-3.el7                   docker-ce-stable 
    docker-ce.x86_64            18.06.2.ce-3.el7                   docker-ce-stable 
    docker-ce.x86_64            18.06.1.ce-3.el7                   docker-ce-stable
    

     六、如这⾥可以安装18.03.0.ce版本:

    sudo yum install docker-ce-18.03.0.ce
    
    报错:如果在安装指定版本的docker时显示需要安装指定版本的docker-ce-selinux依赖包,请安装
    Error: Package: docker-ce-17.03.0.ce-1.el7.centos.x86_64 (docker-ce-stable)
               Requires: docker-ce-selinux >= 17.03.0.ce-1.el7.centos
               Available: docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch (docker-ce-stable)
                   docker-ce-selinux = 17.03.0.ce-1.el7.centos
               Available: docker-ce-selinux-17.03.1.ce-1.el7.centos.noarch (docker-ce-stable)
                   docker-ce-selinux = 17.03.1.ce-1.el7.centos
               Available: docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch (docker-ce-stable)
                   docker-ce-selinux = 17.03.2.ce-1.el7.centos
               Available: docker-ce-selinux-17.03.3.ce-1.el7.noarch (docker-ce-stable)
                   docker-ce-selinux = 17.03.3.ce-1.el7
    
    #解决方法
    yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm 
    
    yum install -y docker-ce-17.03.0.ce-1.el7.centos

    七、启动 Docker

    sudo systemctl enable docker
    sudo systemctl start docker
    另外⼀种安装⽅式是可以直接下载指定的软件包直接安装即可,前往地
    址:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ 找到合适的 .rpm 包下载,
    然后安装即可:
    
    sudo yum install /path/to/package.rpm
  • 相关阅读:
    SpringMVC 高级开发(异常页面处理,json传输数据,文件上传)
    SpringMVC中的Controller方法的(返回值/参数类型)
    SpringMVC的其他注解
    SpringMVC的整合,基于注解
    SpringMVC入门程序:helloWorld
    SpringMVC入门
    SpringAOP事务的实现
    仅需三步,即可在Vue项目中配置sass
    前端常用的设计模式
    call和apply的区别及其用法
  • 原文地址:https://www.cnblogs.com/zhaojingyu/p/11588014.html
Copyright © 2011-2022 走看看