-
Bug
-
Resolution: Done
-
Minor
-
DO188 - RHOSCP4.12-en-4-20231204
-
2
-
False
-
-
False
-
2.3
-
ROLE
-
-
-
en-US (English)
Please fill in the following information:
URL: | https://rol.redhat.com/rol/app/courses/do188-4.12/pages/ch02s03 |
Reporter RHNID: | saniyer |
Section title: | Container Networking Basics |
Language: | en |
Issue description
we have the following excerpt.
~~~~ When using a network with DNS enabled, a container's hostname is the name assigned to the container.
~~~~ This is not exactly correct, The container's hostname is randomly generated and it is not the name assigned to the container. Rather the container is assigned a "alias" as the name assigned to the container.
~~~~ $ podman network inspect net-1 | jq '.[] | .name,.dns_enabled' "net-1" true $ podman inspect apache1 | jq '.[].NetworkSettings.Networks[].NetworkID' "net-1" $ podman exec it apache1 hostname -A 1052bf912993 $ podman exec -it apache1 cat /etc/hostname 1052bf912993 $ podman exec -it apache1 cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.122.46 host.containers.internal 10.89.0.4 1052bf912993 apache1 <<<- $ podman exec -it apache1 hostname -a apache1 ~~~~
Steps to reproduce:
Workaround:
Expected result: