[scl.org] Python S2I Images not taking the environment variables

Abhinay Purty apurty at redhat.com
Fri May 8 06:48:25 UTC 2020


Hello Team,

Do we have an update on this ?

Thanks

On Wed, May 6, 2020 at 5:59 PM Abhinay Purty <apurty at redhat.com> wrote:

> Hello Team,
>
> One of the customer wants to use the Python S2I Image ‘ubi7/python-36’ and
> ‘rhscl/python-36-rhel7’ with a local pypi mirror and pipenv.and they set
> the following env variables:
>
> PIP_TRUSTED_HOST: pypi-mirror.mycompany.local
> PIP_INDEX_URL:
> https://pypi-mirror.mycompany.local/artifactory/api/pypi/pypi.org/simple
> ENABLE_PIPENV: true
>
> However, the installation of pipenv fails because it does not use the
> environment vars. According to the source of the assemble script of the
> python s2i image of python the following script is used.
>
>
> https://github.com/sclorg/s2i-python-container/blob/master/3.6/s2i/bin/assemble#L26
>
> function install_pipenv() {
>   echo "---> Installing pipenv packaging tool ..."
>   VENV_DIR=$HOME/.local/venvs/pipenv
>   virtualenv_bin "$VENV_DIR"
>   $VENV_DIR/bin/pip --isolated install -U pipenv
>   mkdir -p $HOME/.local/bin
>   ln -s $VENV_DIR/bin/pipenv $HOME/.local/bin/pipenv
> }
> For the installation of pipenv, pip is using the --isolated option which
> ignores all environment vars.
>
> Can we have a fix for this image to include the environment variables ?
>
>
> --
> Regards,
>
> Abhinay Purty
>
> Associate Technical Support Engineer
>
> Red Hat India Pvt. Ltd. <https://www.redhat.com>
>
> <https://red.ht/sig>
>


-- 
Regards,

Abhinay Purty

Associate Technical Support Engineer

Red Hat India Pvt. Ltd. <https://www.redhat.com>

<https://red.ht/sig>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/sclorg/attachments/20200508/10944216/attachment.htm>


More information about the SCLorg mailing list