Are you able to put them in a pod/create them in the same network
namespace? Then you could have the containers talk over localhost and not
have to worry about finding the IP.
You can also specify a static ip with --ip on container creation for the
container that needs to be pinged, and then use that IP for the other
container. That could "fix" the container IP, and allow them to communicate
that way rather than name.
Do either of these options help? podman currently doesn't do
intra-container network resolution by name (as you've noticed).
Peter
On Fri, Aug 2, 2019 at 5:56 PM Uwe Reh <reh(a)hebis.uni-frankfurt.de> wrote:
UPPS, Sorry
just after sending my question, I found a similar one from Christoffer
Reijer "Setting up 2 containers", 26 Juni 2019
But my problem is slightly different.
One of the containers is 'optimized' for Docker and uses fixed container
names to call local services. (Not nice but real world)
So the hint from Brent Baude does not really help.
> When two containers belong to the same pod, they share the same network
space. Therefore, there is no need for name resolution. They will both
respond to localhost.
It would be hard to patch all configured container names with "localhost".
Any other hints?
Uwe
Am 02.08.19 um 23:29 schrieb Uwe Reh:
> Hi,
>
> I'm trying to migrate a small set of containers from Docker to Podman.
> Obviously I missed one or two links, because I can't get the ensemble
> run, like I'm used to.
>
> *Problem:
> Having two containers, C1 and C2.
> Running on Docker, the containers can establish bridged IP4 connections
> on each other byIp and byName. With podman it works fine with IP's
> (found with podman inspect) but I wasn't able to resolve any name.
>> podman exec -it C1 ping 10.88.0.7
>> PING 10.88.0.7 (10.88.0.7): 56 data bytes
>> 64 bytes from 10.88.0.7: seq=0 ttl=64 time=0.105 ms podman exec -it
>> C1 ping C2
>> ping: bad address 'C2'
>
> *Question:
> What have I missed to have dynamic DNS service for the containers inside
> the bridge or slirp4netns?
>
>
> *Runtime:
>> podman version
>> Version: 1.4.4
>> RemoteAPI Version: 1
>> Go Version: go1.12.6
>> OS/Arch: linux/amd64
> on
>> cat /etc/os-release NAME="openSUSE Leap"
>> VERSION="15.0"
>> ID="opensuse-leap"
>
> Uwe
>
>
>
_______________________________________________
Podman mailing list -- podman(a)lists.podman.io
To unsubscribe send an email to podman-leave(a)lists.podman.io