Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5624

ubi8/python-39 invokes activate on two venvs with bash as command

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • rhel-8.7.0
    • python39
    • None
    • Moderate
    • rhel-sst-cs-databases
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      When invoking "bash" as a command using ubi8/python-39:1-113 appears to launch two venv's:

      $ podman run -it --name test --rm registry.redhat.io/ubi8/python-39:1-113 /bin/bash
      (app-root) (app-root)

      $ podman run -it --name test --rm registry.access.redhat.com/ubi8/python-39:1-113.1682304667 /bin/bash
      (app-root) (app-root)

      This could theoretically be problematic during image building but, as the entrypoint of the image is a custom script, it's unknown if this has any impact whatsoever.

      $ podman inspect registry.access.redhat.com/ubi8/python-39:1-113.1682304667 | jq '.[].Config.Entrypoint'
      [
      "container-entrypoint"
      ]

      Nonetheless, we have a customer asking what is the purpose of this, or if it's a bug in the image configuration.

      This seems to happen in all 3.9 configurations I tested, including registry.access.redhat.com/ubi8/python-39:1-105.1679486069. As seen in the Dockerfile (https://github.com/sclorg/s2i-python-container/blob/a2079c656085ef24d3d9ab77c79a1dd44a18ad95/3.9/Dockerfile.rhel8#L89-L90), we're suspecting that this is invoking both ENV and BASH_ENV leading to two activate.sh's being run, but have not been able to narrow it down.

      We'd like to know specifically:

      • Are there any side effects to getting two venv's activated in this way that might hurt the build process?
      • Can you confirm this is only happening when we set the command as "bash", and not during the S2I process for the container image? Is only one venv being run when we actually execute applications?
      • Can this be corrected if it is indeed problematic/a bug?

      Actual results:
      It appears two venv's are being activated.

      Expected results:
      We expect only one.

      Additional info:
      This may be a non-issue depending on how venv works; I do not know enough to say for certain.

              phracek@redhat.com Petr Hracek
              rhn-support-rmanes Robb Manes
              Petr Hracek Petr Hracek
              Lukas Zachar Lukas Zachar
              Lenka Špačková Lenka Špačková
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: