-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Feature request description
Hi, when I use the option -p 80:80 to publish ports without specifying the host IP I would like Podman to assume 0.0.0.0 when running on servers and 127.0.0.1 when running on Linux desktop.
On Ubuntu 2x.04 LTS and Fedora 4x I get 0.0.0.0 when I don't specify anything (I check using podman ps) on rootless Podman. So I want to configure desktop installations to use 127.0.0.1.
I can achieve this with Docker by setting:
{
"ip" : "127.0.0.1"
}in /etc/docker/daemon.json.
I wasn't able to find the equivalent for Podman, so I opened a discussion and it was confirmed there isn't such option. I am expecting an option in containers.conf.
Notice that I want to be able to overwrite the IP when needed by using -p 0.0.0.0:80:80, so the option I am looking for must only overwrite what Podman assumes when no IP is specified (-p 80:80).
Thank you in advance.
Suggest potential solution
An option like ip=x.x.x.x in containers.conf.
Have you considered any alternatives?
I have considered using a variable like -p $IP:80:80 but this assumes the user is aware of this issue. As a sys-admin I would like to overwrite the behavior for desktop users so that they won't expose anything in the LAN by mistake.
Additional context
No response