Skip to content

Commit

Permalink
build: use virtualenv instead of symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
mzulqarnain1 committed Oct 8, 2021
1 parent bf91499 commit 8a4a1a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ RUN apt-get update && apt-get install -y \
COPY . /usr/local/src/xblock-sdk
WORKDIR /usr/local/src/xblock-sdk

RUN ln -s /usr/bin/python3.8 /usr/bin/python && \
/usr/bin/python3 -m pip install --upgrade pip && \
pip install -r /usr/local/src/xblock-sdk/requirements/dev.txt
ENV VIRTUAL_ENV=/venvs/xblock-sdk
RUN python3.8 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip install --upgrade pip && pip install -r /usr/local/src/xblock-sdk/requirements/dev.txt

RUN curl -sL https://deb.nodesource.com/setup_14.x -o /tmp/nodejs-setup && \
/bin/bash /tmp/nodejs-setup && \
Expand All @@ -26,5 +28,5 @@ RUN curl -sL https://deb.nodesource.com/setup_14.x -o /tmp/nodejs-setup && \
make install

EXPOSE 8000
ENTRYPOINT ["python3", "manage.py"]
ENTRYPOINT ["python", "manage.py"]
CMD ["runserver", "0.0.0.0:8000"]

0 comments on commit 8a4a1a7

Please sign in to comment.