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

Incomplete data loading example in c05s03

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • DO188 - RHOSCP4.14-en-2-20240723
    • DO188
    • False
    • Hide

      None

      Show
      None
    • False
    • 5
    • en-US (English)

      Please fill in the following information:


      URL: https://rol.redhat.com/rol/app/courses/do188-4.14/pages/ch05s03
      Reporter RHNID: bucknd
      Section Title: Guided Exercise: Working with Databases 

      Issue description

      The example as shown in the book....

      podman run -it --rm \
      -v ./SQL_FILE:/tmp/SQL_FILE:Z \
      --network DATABASE_NETWORK \
      registry.redhat.io/rhel8/postgresql-12:1-113 \
      psql -U DATABASE_USER -h DATABASE_CONTAINER \
      -d DATABASE_NAME -f /tmp/SQL_FILE

      is incomplete in that for the student to properly appreciate what is going on there should be two volume mounts - one as already shown to mount the sql file on the host inside the container and a second one which will preserve the data that has been written to the container. At the moment as there is --rm in the run statement the container will be deleted and the data just loaded will be lost. Having already explained persistent storage we should follow our own best practices

      Suggest adding an additional volume mount something like -v /HOST_FOLDER/:/var/pgsql/data:Z to complete the example

      Steps to reproduce:

       

      Workaround:

       

      Expected result:

              gls-curriculum-ocp-adv@redhat.com PTL - AppDev Team
              bucknd David Bucknell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: