Skip to content

Commit d181d56

Browse files
committed
Fixed env
1 parent e8a27a1 commit d181d56

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ RUN bash ./setup_18.x && $APT_INSTALL make build-essential net-tools apt-utils l
2424
# pyenv install python
2525
ENV PYENV_ROOT=/shared/.pyenv
2626
ENV PYTHONUSERBASE="$PYENV_ROOT/versions/$PYTHON_VERSION"
27-
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PYENV_ROOT/versions/'$PYTHON_VERSION'/bin:$PATH
27+
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PYENV_ROOT/versions/$PYTHON_VERSION/bin:$PATH
2828

2929
RUN echo '# pyenv setup' > /etc/profile.d/pyenv.sh
30-
RUN echo 'export PYENV_ROOT=/shared/.pyenv' >> /etc/profile.d/pyenv.sh
31-
RUN echo 'export PYTHONUSERBASE="$PYENV_ROOT/versions/$PYTHON_VERSION"' >> /etc/profile.d/pyenv.sh
32-
RUN echo 'export PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PYENV_ROOT/versions/'$PYTHON_VERSION'/bin:$PATH' >> /etc/profile.d/pyenv.sh
30+
RUN echo 'export PYENV_ROOT="'$PYENV_ROOT'"' >> /etc/profile.d/pyenv.sh
31+
RUN echo 'export PYTHONUSERBASE="'$PYTHONUSERBASE'"' >> /etc/profile.d/pyenv.sh
32+
RUN echo 'export PATH="'$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PYENV_ROOT/versions/$PYTHON_VERSION/bin':$PATH"' >> /etc/profile.d/pyenv.sh
3333
RUN echo 'eval "$(pyenv init -)"' >> /etc/profile.d/pyenv.sh
3434
RUN chmod +x /etc/profile.d/pyenv.sh
3535
RUN chmod +x ./pyenv.run && \
36+
source /etc/profile.d/pyenv.sh && \
3637
./pyenv.run && pyenv update && pyenv install $PYTHON_VERSION && pyenv global $PYTHON_VERSION && pyenv rehash && \
3738
update-alternatives --install /usr/bin/python python $PYENV_ROOT/shims/python3 0 && \
3839
update-alternatives --install /usr/bin/python3 python3 $PYENV_ROOT/shims/python3 0 && \

0 commit comments

Comments
 (0)