Unverified Commit a458ee75 by Exalyon Committed by Paul B

Update Dockerfile to be more simple

Remove virtualenv (useless with docker)
Be more close to official documentation : https://hub.docker.com/_/python
parent dd0df83e
Pipeline #982 passed with stage
in 22 seconds
FROM python:3-slim
FROM python:3
ENV PYTHONUNBUFFERED=1
# Add french locale
RUN apt update && \
......@@ -7,20 +9,14 @@ RUN apt update && \
sed -i '/^#.* fr_FR.UTF-8 /s/^#//' /etc/locale.gen && \
locale-gen
# Virtual env:
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
WORKDIR /home/app
# Install dependencies:
COPY requirements.txt /home/app/
RUN pip install -r requirements.txt
RUN pip install --upgrade pip
# Setup volume to be able to dev application locally
VOLUME /home/app
COPY . /home/app
RUN pip install -r requirements.txt
# Run the application:
EXPOSE 8080
CMD ["./launch.sh", "0.0.0.0", "8080"]
CMD python manage.py runserver 0.0.0.0:8080
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment