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

DO188-33: Ch05s04 Unnecessary host port mapping to postgres when using isolated network

XMLWordPrintable

    • 5
    • ROLE
    • en-US (English)

      URL:
      Reporter RHNID:
      Section: - GUIDED EXERCISE: Working with Databases
      Language: en-US (English)
      Workaround: Remove the `-p 5432:5432` in step 5.3. Run the rest as written:

      [student@workstation ~]$ podman run -d --name persisting-pg12 -e POSTGRESQL_USER=backend -e POSTGRESQL_PASSWORD=secret_pass -e POSTGRESQL_DATABASE=rpi-store -v rpi-store-data:/var/lib/pgsql/data --network persisting-network registry.ocp4.example.com:8443/rhel8/postgresql-12:1-113

      Description: After creating the isolated network "persisting-network" there is no need for the host port mapping.  In fact, that is one of the benefits of using an isolated network with databases (to avoid exposing the database over the host network). 

      The command in 5.3 should be updated so that it doesn't include `-p 5432:5432`. 

      [student@workstation ~]$ podman run -d \
      --name persisting-pg12 \
      -e POSTGRESQL_USER=backend \
      -e POSTGRESQL_PASSWORD=secret_pass \
      -e POSTGRESQL_DATABASE=rpi-store \
      *-p 5432:5432 *
      -v rpi-store-data:/var/lib/pgsql/data \
      --network persisting-network \
      registry.ocp4.example.com:8443/rhel8/postgresql-12:1-113

       

              mczernek@redhat.com Marek Czernek (Inactive)
              rhn-support-ablum Andrew Blum
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: