✍08 docker安装问题

可以先挂载本地镜像

卸载旧版本

 sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

设置存储库

sudo yum install -y yum-utils

下载docker-ce.repo源(阿里镜像站)

sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 

安装

sudo yum install docker-ce docker-ce-cli containerd.io

问题

Error:
 Problem: problem with installed package podman-1.6.4-10.module_el8.2.0+305+5e198a41.x86_64
  - package podman-1.6.4-10.module_el8.2.0+305+5e198a41.x86_64 requires runc >= 1.0.0-57, but none of the providers can be installed
  - package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-65.rc10.module_el8.2.0+305+5e198a41.x86_64
  - package containerd.io-1.3.7-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-65.rc10.module_el8.2.0+305+5e198a41.x86_64
  - package docker-ce-3:19.03.13-3.el8.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
  - conflicting requests
  - package runc-1.0.0-64.rc10.module_el8.2.0+304+65a3c2ac.x86_64 is filtered out by modular filtering
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)

redhat安装docker-ce,解决

sudo yum erase podman buildah
yum install docker-ce|dnf install docker-ce  # root用户安装, sudo不管用

简单使用

#启动
sudo systemctl start docker

#停止
sudo systemctl stop docker

#重启		
sudo service docker restart

#开机启动
sudo systemctl enable docker
/etc/docker/daemon.json
{
    "default-funtime: nvidia",
    "runtimes": {
        "nvidia": {
            "path": "nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}
~ 
posted @ 2021-10-14 00:20  给你骨质唱疏松  阅读(88)  评论(0编辑  收藏  举报