Podman-compose创建的容器无法互通的解决方法

422 阅读1分钟

手动创建network或者在compse文件指定network都是无用功。 因为podman默认安装没有dnsname插件,需要手动安装。

安装dnsname

yum install dnsmasq
git clone https://github.com/containers/dnsname
yum install golang
make install PREFIX=/usr

删除旧的容器和网络

podman rm xxxxx
podman network xxxx

重新运行

podman-compose up -d

参考: