PATH variable in Docker containers is not preserved in some cases

XMLWordPrintable

      Sometimes when starting a docker container using as root and then switching to a newly added user with "su" some core environment variables such as PATH are not preserved. (https://stackoverflow.com/questions/32574429/dockerfile-create-env-variable-that-a-user-can-see)

      This can be an issue when PATH contains locations with installed packages such as python packages. By not preserving the PATH this packages are not discoverable anymore.

      A potential fix is to save the PATH to a temporary variable (eg. _PATH or PATH_TEMP) and then restore it in the *-cont.sh script that pegasus invokes inside the container.

            Assignee:
            Karan Vahi
            Reporter:
            George Papadimitriou
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: