简体   繁体   English

安装了 docker,我得到了 podman

[英]Installed docker and I got podman

Installed docker on Centos (running using VirtualBox) following steps below:按照以下步骤在 Centos 上安装 docker(使用 VirtualBox 运行):

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

sudo yum install docker

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

And I rebooted my virtual machine, and as I type 'docker --version, I get below:我重新启动了我的虚拟机,当我输入“docker --version”时,我得到以下信息:

"Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.  podman version 1.0.5"

Can anybody explain what is going on in my machine?谁能解释一下我的机器上发生了什么?

@swxraft if you run the commands in the order posted in your question @swxraft 如果您按照问题中发布的顺序运行命令

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

sudo yum install docker须藤 yum 安装码头工人

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

you installed a docker in the REHL repo (probably an alias to podman).您在 REHL 存储库中安装了一个 docker(可能是 podman 的别名)。 And then loaded the repo for the oficial docker but never installed from there.然后为官方 docker 加载 repo,但从未从那里安装。


Extra info:额外信息:

A) installation docker A) 安装docker

How to install docker: follow this link [1] instead @govinda-malavipathirana.如何安装 docker:点击此链接 [1] 而不是 @govinda-malavipathirana。 Latest docker-ce needs a newer containerd.io but REHL is excluding the ones in the docker repo.最新的 docker-ce 需要更新的 containerd.io,但 REHL 不包括 docker repo 中的那些。 So you need to install docker -ce with --nobest (see instructions and error in link).因此,您需要使用 --nobest 安装 docker -ce (请参阅链接中的说明和错误)。 Also you need to disable the firewall.d to have DNS in docker.您还需要禁用 firewall.d 才能在 docker 中使用 DNS。

B) why docker is not in REHL8 B) 为什么 docker 不在 REHL8 中

Docker cli and daemon are not supported by REHL8 and its derivatives and it is "blocked" in several ways. REHL8 及其衍生产品不支持 Docker cli 和 daemon,它以多种方式被“阻止”。 Why is not suported -> monolitic and old [2]为什么不支持 -> 单一且陈旧 [2]

Docker containers ARE supported using podman .使用podman支持 Docker 容器。 The containers created with docker work with podman and viceversa.使用 docker 创建的容器与 podman 一起使用,反之亦然。 Also podman commands are the same as docker client. podman 命令也与 docker 客户端相同。

Podman is a substitute of docker (but it does not use a daemon). Podman 是 docker 的替代品(但它不使用守护进程)。 They recommend to add a symlink docker -> podman and you will not notice the difference [3]他们建议添加一个符号链接 docker -> podman 你不会注意到区别 [3]

[1] https://linuxconfig.org/how-to-install-docker-in-rhel-8 [1] https://linuxconfig.org/how-to-install-docker-in-rhel-8

[2] http://crunchtools.com/why-no-docker/ [2] http://crunchtools.com/why-no-docker/

[3] https://developers.redhat.com/blog/2019/02/21/podman-and-buildah-for-docker-users/ [3] https://developers.redhat.com/blog/2019/02/21/podman-and-buildah-for-docker-users/

Docker will not support RedHat 8, it will be installed as Podman. Docker 不支持 RedHat 8,它将作为 Podman 安装。

So you can try it with Amazon linux2 instead of RedHat.所以你可以用 Amazon linux2 而不是 RedHat 来试试。 You have to create a new instance in AWS with Amazon linux2, then it will work.您必须使用 Amazon linux2 在 AWS 中创建一个新实例,然后它才能工作。

Since docker is not officially supported by REHL8/CentOS8.由于docker没有正式REHL8 / CentOS8支持。 You have to install it by additional steps.您必须通过其他步骤安装它。 This is a good article I have found in the internet, shows how to install docker in CentOS 8.这是我在互联网上找到的一篇好文章,展示了如何在 CentOS 8 中安装 docker。

https://computingforgeeks.com/install-docker-and-docker-compose-on-rhel-8-centos-8 https://computingforgeeks.com/install-docker-and-docker-compose-on-rhel-8-centos-8

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM