Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
fix: update dockerfile to use virtualenv and python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ohnickmoy committed Apr 6, 2022
1 parent aa03117 commit 575827d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ RUN pip3 install --upgrade pip setuptools
RUN rm -rf /var/lib/apt/lists/*

# Python is Python3.
RUN ln -s /usr/bin/python3 /usr/bin/python
ENV VIRTUAL_ENV=/edx/app/registrar/venvs/registrar
RUN python3.8 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# Use UTF-8.
RUN locale-gen en_US.UTF-8
Expand All @@ -39,8 +41,8 @@ WORKDIR /edx/app/registrar

# Copy just Python requirements & install them.
COPY requirements/ /edx/app/registrar/requirements/
COPY Makefile /edx/app/registrar/
RUN make production-requirements
RUN pip install -r requirements/pip.txt
RUN pip install -r requirements/production.txt

USER app

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## re-compile requirements .txt fi
mv requirements/test.tmp requirements/test.txt

piptools:
pip install -r requirements/pip.txt
pip install -r requirements/pip-tools.txt

requirements: devstack-requirements ## alias to make devstack-requirements
Expand Down
2 changes: 2 additions & 0 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pip==20.2.3
setuptools==50.3.0

0 comments on commit 575827d

Please sign in to comment.