Live data from Hacker News

Podman 4.4

github.com

1–10 of 43 posts

Re: Podman 4.4

#6
I hope more open source projects support it.

Most repos I check out still have only docker specific commands…

Even though most things are similar, the differences in e.g networking (for example host.docker.internal vs host.containers.internal) create lots of Issues for me

Re: Podman 4.4

#7

Did they sort out rootless networking? I've tried podman twice but simply cannot get networking to work properly when using a docker-compose file.

I haven’t had issues with rootless networking but I run pretty simple apps. I gave up on podman-compose though and run individual commands to create podman objects. Once rootless containers are in the same pod you can access other containers in the same pod over localhost

Re: Podman 4.4

#8

Did they sort out rootless networking? I've tried podman twice but simply cannot get networking to work properly when using a docker-compose file.

What was wrong with it?

It is very difficult getting containers that aren’t in a pod together to be able to talk to each other, with rootless pods, and without just host-binding everything. None of the normal hostname conveniences are in place, and if it’s possible to do it isn’t default and probably needed much more underlying knowledge than I had when I tried.

Re: Podman 4.4

#9
post #6

I hope more open source projects support it. Most repos I check out still have only docker specific commands… Even though most things are similar, the differences in e.g networking (for example host.docker.internal vs host.containers.internal) create lots of Issues for me

You may be able to symlink podman to /usr/bin/docker and things should "Just Work"

Re: Podman 4.4

#10
post #8

Earlier quoted context omitted.

What was wrong with it?

It is very difficult getting containers that aren’t in a pod together to be able to talk to each other, with rootless pods, and without just host-binding everything. None of the normal hostname conveniences are in place, and if it’s possible to do it isn’t default and probably needed much more underlying knowledge than I had when I tried.

I think the new network implementation in Podman 4 ("netavark") helps with that sort of thing.

So the following works:

    [sam@isis ~]$ podman network create foo
    foo

    [sam@isis ~]$ podman run -d --name=host1 --network=foo --init registry.access.redhat.com/ubi9/ubi-minimal sleep inf
    1f7ffa0e474f7116d782ffa4d8dd9c0454893e9dac54b2cd9e61481a7f86a2ff

    [sam@isis ~]$ podman run -d --name=host2 --network=foo --init registry.access.redhat.com/ubi9/ubi-minimal sleep inf
    d8ffa58cb9de77305545b9f85043c016d03193adb6543b1768a68623b044b0e5

    [sam@isis ~]$ podman exec host1 getent ahosts host2
    10.89.0.3       STREAM host2.dns.podman
    10.89.0.3       DGRAM  
    10.89.0.3       RAW    
    
    [sam@isis ~]$ podman exec host2 getent ahosts host1
    10.89.0.2       STREAM host1.dns.podman
    10.89.0.2       DGRAM  
    10.89.0.2       RAW    
i.e., we have a network called 'foo' to which containers 'host1' and 'host2' are attached; they can resolve each others hostnames.

It's worth noting if you are trying this on a system where you previously ran podman (Personally I just run all containers with --host=net, this is just for local development, who cares)

I think this will work with docker-compose as long as you 'systemctl --user start podman.socket' and 'export DOCKER_HOST=unix:/$XDG_RUNTIME_DIR/podman/podman.sock'.

Post reply on HN