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

DO188-77: CH02s05 : podman inspect my-app -f '{{.NetworkSettings..... command will not work to get IP if network name has a dash character

XMLWordPrintable

    • 2
    • en-US (English)

      URL: https://rol.redhat.com/rol/app/courses/do188-4.10/pages/ch02s05
      Reporter RHNID: ctiwary@redhat.com
      Section: 5 - Accessing Containerized Network Services
      Language: en-US (English)
      Workaround:

      Description: Ch02s05 : Last paragraph :

      "For example, a container called my-app is attached to the apps network. The following command retrieves the private IP address of the container within the apps network.

      [user@host ~]$ podman inspect my-app \
      -f '.NetworkSettings.Networks.apps.IPAddress'
      10.89.0.2"
      Suppose the network name is "example-net" - then I doubt this will work. We might need to tweak the command like this : podman inspect <container_id_or_name> | jq -r '.NetworkSettings.Networks."example-net".IPAddress' OR I'd suggest changing to a pipe and grep command.

      This was also reported by RHA instructor Tracy Baker!

        1. screenshot-2.png
          screenshot-2.png
          113 kB
        2. screenshot-1.png
          screenshot-1.png
          149 kB
        3. DO188_ch02s5.png
          DO188_ch02s5.png
          79 kB

            rh-ee-jyague Jaime Yague
            chetan-rhls Chetan Tiwary
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: