Skip to content

Commit be7fe16

Browse files
committed
Reinstate pip and use static path venv.
1 parent ab48a6a commit be7fe16

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN add-apt-repository ppa:deadsnakes/ppa \
4949
python-is-python3
5050
RUN 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.
5353
ENV PATH /home/$USERNAME/.local/bin:$PATH
5454
# Ensure local python is preferred over distribution python
5555
ENV PATH /usr/local/bin:$PATH
@@ -76,10 +76,12 @@ RUN chown -R $USERNAME:$USERNAME /miktex
7676
RUN chown -R $USERNAME:$USERNAME /app
7777
USER $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

8587
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)