File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ RUN add-apt-repository ppa:deadsnakes/ppa \
4949 python-is-python3
5050RUN curl https://bootstrap.pypa.io/get-pip.py > /home/$USERNAME/get-pip.py \
5151 && chmod +x /home/$USERNAME/get-pip.py
52- # # Enable pip binaries from user path.
52+ # # Enable pip/poetry binaries from user path.
5353ENV PATH /home/$USERNAME/.local/bin:$PATH
5454# Ensure local python is preferred over distribution python
5555ENV PATH /usr/local/bin:$PATH
@@ -76,10 +76,12 @@ RUN chown -R $USERNAME:$USERNAME /miktex
7676RUN chown -R $USERNAME:$USERNAME /app
7777USER $USERNAME
7878
79+ # # Get poetry as user. Create a user level python virtual environemnt.
80+ RUN curl -sSL https://install.python-poetry.org | python3 -
7981# # Get pip as user. Create a user level python virtual environemnt.
80- RUN python3 -m venv /app/docker_venv \
81- && . /app/docker_venv /bin/activate \
82+ RUN python3 -m venv /home/$USERNAME/app_venv \
83+ && . /home/$USERNAME/app_venv /bin/activate \
8284 && python3 /home/$USERNAME/get-pip.py \
83- && echo ". /app/docker_venv /bin/activate" >> /home/$USERNAME/.bashrc
85+ && echo ". /$HOME/app_venv /bin/activate" >> /home/$USERNAME/.bashrc
8486
8587CMD ["/bin/bash" ]
You can’t perform that action at this time.
0 commit comments