Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-11163

RHT2066580: User feedback: DO188: When using a network with DNS enabled, a container's hostname is the name assigned to the container.

XMLWordPrintable

    • 2
    • False
    • Hide

      None

      Show
      None
    • 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:

            marc_kesler Marc Kesler (Inactive)
            wraja@redhat.com Wasim Raja
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: