-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot resolve other containers names in internal network #10672
Comments
As you can see by the warning, dnsname is not supported with internal networks. For now you have to use external network if you want to use dnsname. |
Thanks for the feedback. And are there any known workarounds for the time being? |
A friendly reminder that this issue had no activity for 30 days. |
This is important for rootless docker-compose. |
Rootful podman has the same problem, this is not a rootless only issue. |
A friendly reminder that this issue had no activity for 30 days. |
This can be easily reproduced with this example: services:
nginx:
image: nginx
client:
image: alpine
command: "sh -c 'apk add curl && curl -v nginx:80 && echo It works'" And then: docker-compose up nginx
docker-compose up client Are there any known workarounds? |
For rootfull networks, you can enable the dnsname plugin at the system level https://podman.io/getting-started/network#using-dns-in-container-networks For the rootless ones, this has not been documented afaik, and I don't know if it's implemented or feasible. |
This is the most commonly used docker-compose functionality. People use docker-compose almost exclusively for the implicit internal network capability, yet this is not supported by podman... I must be missing something here. I cannot imagine that podman, especially v3 with the touted docker-compose compatibility lacks this fundamental basic capability. |
This issue is about internal networks not all networks! Your normal docker-compose networks should work with dns. |
For the specific issue here (internal networks), we should be able to support this with the 4.0 network rewrite, though 4.0 is going to be focused on feature parity, so it may slip to 4.1. |
docker-compose up does not work in this most basic compose file. 'server' cannot be resolved. edit: not to derail this thread further, but for other travelers, installing https://github.com/containers/dnsname enabled container <-> container resolution for the sample above. |
That's a separate issue. Please file a new issue. |
A separate issue? I posted the same example 29 days ago. It was my understanding that this issue tracked exactly that example. |
In #10672 (comment) the network is not internal (isolated), that's why it's a separate issue. |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
works with podman4 |
Not for me it doesn't: (default) [sddev@sd-dev-vm ~/test]$ cat /etc/redhat-release
CentOS Stream release 8
(default) [sddev@sd-dev-vm ~/test]$ podman version
Client: Podman Engine
Version: 4.0.2
API Version: 4.0.2
Go Version: go1.17.7
Built: Tue Mar 15 21:15:06 2022
OS/Arch: linux/amd64 version: '3.5'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.3
container_name: elasticsearch
environment:
- ELASTIC_PASSWORD=changeme
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms128m -Xmx256m
- xpack.license.self_generated.type=trial
- xpack.security.enabled=true
ports:
- 9200:9200
kibana:
image: docker.elastic.co/kibana/kibana:7.16.3
container_name: kibana
ports:
- 5601:5601
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml (default) [sddev@sd-dev-vm ~/test]$ sudo docker-compose up -d
Creating network "test_default" with the default driver
Creating elasticsearch ... done
Creating kibana ... done
(default) [sddev@sd-dev-vm ~/test]$ sudo podman exec kibana curl http://elasticsearch:9200
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: elasticsearch This is quite a significant problem. |
It only works with netavark/aardvark not cni. |
But I have not opted to use cni, I use default settings which should use arrdvark |
Netavark is only used on new installs (or you have to run podman system reset) and distros that support it. |
Another note for Ubuntu travelers: this can be resolved by installing golang-github-containernetworking-plugin-dnsname via |
Unfortunately like @megakoresh this doesn't work for me either, on a fresh Fedora 36 install.
Is there a log or somewhere I can look to troubleshoot this? |
This is a very old issue. Please file a new bug report. |
While this issue may be old... it remains completely unresolved. |
Then file a new bug issue, we would prefer new issues with full info on the version of Podman you are seeing the issue with. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Containers in internal network are not able to see each other
Steps to reproduce the issue:
As rootless user.
Describe the results you received:
Containers in same network cannot find each other.
Describe the results you expected:
Containers should see each other.
Additional information you deem important (e.g. issue happens only occasionally):
This works on docker:
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Physical Fedora Silverblue 34. Trying to migrate from docker-compose project that needs internal network with discovery.
The text was updated successfully, but these errors were encountered: