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 5b385c9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ RUN apt-get update && apt-get install -y \
zlib1g-dev \
python3 \
python3-dev \
python3-venv \
python3-pip && \
pip3 install --upgrade pip setuptools && \
rm -rf /var/lib/apt/lists/*

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 +29,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 5b385c9

Please sign in to comment.