Accessing host from inside Podman 5.0 container

Sometimes you need to connect to the host from a Podman container running on it. How would you do that? In the past I was able to get this working by connecting to the gateway IP of the container. For example, I have a web server running on the host listening on port 8080. ➜ nc -vz localhost 8080 Ncat: Version 7.92 ( https://nmap.org/ncat ) Ncat: Connected to 127.0.0.1:8080. Ncat: 0 bytes sent, 0 bytes received in 0....

December 2, 2024 · 2 min · 420 words · kenno