-
I'm working on putting a certain application into a podman pod, which relies on DNS resolution of internal hosts but refuses to consult See the following reproducer, where I add a new host #!/bin/bash
function cleanup() {
# container ignores SIGTERM
podman container kill toolbox3
podman pod stop pod3
podman container rm toolbox3
podman pod rm pod3
podman network rm podman3
}
trap cleanup EXIT
podman network create --subnet 10.90.1.0/24 podman3
podman pod create --network=podman3 --name=pod3 --add-host mulefa:10.90.1.10
podman create --pod pod3 --name toolbox3 registry.opensuse.org/opensuse/toolbox sleep infinity
podman pod start pod3
# host is not installed by default in the toolbox container
podman exec toolbox3 zypper -n in bind-utils >/dev/null
# Always returns "Host mulefa not found: 3(NXDOMAIN)"
podman exec toolbox3 host mulefa
podman exec toolbox3 host mulefa 10.90.1.1 Here the result for the last two requests is always "Host mulefa not found"
Am I doing something wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
--add-hosts only controls the writing of /etc/hosts so this has nothing to do with dns/aardvark-dns If you want specific dns names to aardvark-dns then you must use |
Beta Was this translation helpful? Give feedback.
--add-hosts only controls the writing of /etc/hosts so this has nothing to do with dns/aardvark-dns
If you want specific dns names to aardvark-dns then you must use
--network-alias mulefa
which add the alias to all networks the container is part of or--network podman3:alias=mulefa
to only add the name for a specific network