zoukankan      html  css  js  c++  java
  • 记CentOS8下安装Docker

    今天换了台CentOS8机器,按以前装的时候发现有些地方不同,在此记录下

    [root@VM-0-16-centos ~]# sudo yum install docker-ce docker-ce-cli containerd.io
    Qcloud centos - AppStream                                                     4.0 kB/s | 4.3 kB
    Qcloud centos - BaseOS                                                         43 kB/s | 3.9 kB
    Qcloud centos - extras                                                        1.4 kB/s | 1.5 kB
    EPEL for redhat/centos 8 - x86_64                                             4.3 kB/s | 4.7 kB
    No match for argument: docker-ce
    No match for argument: docker-ce-cli
    No match for argument: containerd.io
    Error: Unable to find a match
    
    

    出现了以上问题,以为是新机器所以换了下源,结果是一样
    后来装上依赖就OK了

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

    如果报了如下错误,说明版本错误

    [root@VM-0-16-centos ~]# sudo yum install docker-ce docker-ce-cli containerd.io
    Repository epel is listed more than once in the configuration
    Docker CE Stable - x86_64                                         4.2 kB/s |  25 kB     00:05
    Error:
     Problem: package docker-ce-3:19.03.12-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of                                            the providers can be installed
      - cannot install the best candidate for the job
      - package containerd.io-1.2.10-3.2.el7.x86_64 is filtered out by modular filtering
      - package containerd.io-1.2.13-3.1.el7.x86_64 is filtered out by modular filtering
      - package containerd.io-1.2.13-3.2.el7.x86_64 is filtered out by modular filtering
      - package containerd.io-1.2.2-3.3.el7.x86_64 is filtered out by modular filtering
      - package containerd.io-1.2.2-3.el7.x86_64 is filtered out by modular filtering
      - package containerd.io-1.2.4-3.1.el7.x86_64 is filtered out by modular filtering
      - package containerd.io-1.2.5-3.1.el7.x86_64 is filtered out by modular filtering
      - package containerd.io-1.2.6-3.3.el7.x86_64 is filtered out by modular filtering
    (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best cand                                           idate packages)
    
    

    需要安装新的

    dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

    然后再进行接下去的步骤

    sudo yum install docker-ce docker-ce-cli
     
    sudo systemctl start docker
    
    

    验证一下,并加入开机启动

    OK~

  • 相关阅读:
    Mysql登录错误:ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded
    Docker配置LNMP环境
    Docker安装mysqli扩展和gd扩展
    Docker常用命令
    Ubuntu常用命令
    单例模式的优缺点和使用场景
    ABP 多租户数据共享
    ABP Core 后台Angular+Ng-Zorro 图片上传
    ERROR Error: If ngModel is used within a form tag, either the name attribute must be set or the form control must be defined as 'standalone' in ngModelOptions.
    AbpCore 执行迁移文件生成数据库报错 Could not find root folder of the web project!
  • 原文地址:https://www.cnblogs.com/shook/p/13563017.html
Copyright © 2011-2022 走看看