Unverified Commit f10315c0 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 ad0d6717
Pipeline #981 passed with stage
in 20 seconds
FROM python:3-slim FROM python:3
ENV PYTHONUNBUFFERED=1
# Add french locale # Add french locale
RUN apt update && \ RUN apt update && \
...@@ -7,20 +9,14 @@ RUN apt update && \ ...@@ -7,20 +9,14 @@ RUN apt update && \
sed -i '/^#.* fr_FR.UTF-8 /s/^#//' /etc/locale.gen && \ sed -i '/^#.* fr_FR.UTF-8 /s/^#//' /etc/locale.gen && \
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 WORKDIR /home/app
# Install dependencies: RUN pip install --upgrade pip
COPY requirements.txt /home/app/
RUN pip install -r requirements.txt
# Setup volume to be able to dev application locally COPY . /home/app
VOLUME /home/app
RUN pip install -r requirements.txt
# Run the application: # Run the application:
EXPOSE 8080 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