是否可以嵌套Docker/Podman容器
我运行Fedora 35,需要在Ubuntu的Docker运行一个应用程序。 我能够通过Podman
podman pull ubuntu:20.04
和Setup Do Docker在那里获得Ubuntu,但无法运行它,因为我可能没有正确地进入Podman。我使用过:
podman run -it ubuntu:20.04
我运行的地方:
su -
apt update; apt upgrade
apt install inetutils-ping nano sudo npm
apt install apt-transport-https ca-certificates curl gnupg
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" |sudo tee /etc/apt/sources.list.d/docker.list > /dev/null apt update
apt install docker-ce docker-ce-cli containerd.io
在容器中不可能通过 systectl
启动Docker,并且 dockerd
命令给出了许多错误,主要是它无法访问覆盖层,并且可能网络(iptables)
ERRO [2022-05-07T23:14:18.803335993+02:00]无法安装覆盖:操作不允许存储-DRIVER = OVERLAY2 erro [2022-05-07T23:14:18.803397023+02:00] exec:“ fuse-overlayfs”:在$ path storage-driver中找不到可执行文件 ERRO [2022-05-07T23:14:18.803500924+02:00] AUFS WDA在 /proc /proc /filesystems storemate-drover = aufs中找不到 ERRO [2022-05-07T23:14:18.803887844+02:00]无法安装覆盖层:操作不允许存储-DRIVER =
完全可以运行和应用程序可以使用Service以开放端口,以开放端口Podman有2层嵌套容器?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不可能在另一个容器内使用类型
Overlay
的默认存储驱动程序,您需要将存储更改为vfs
。也许有帮助。免责声明:这绝对是在Docker中运行Podman的情况下,但反之,我尚未进行测试。
It is not possible to use the default storage driver of type
overlay
inside another container, you need to change the storage tovfs
. Maybe https://docs.docker.com/storage/storagedriver/vfs-driver/ helps.Disclaimer: This works definitely in case of running podman in docker, but the other way around I have not tested.