From 06deb26eb0d5a8f4bc8af5ac4573056a7ec9f12a Mon Sep 17 00:00:00 2001 From: Marco Zeisler Date: Mon, 3 May 2021 16:45:48 +0200 Subject: [PATCH] improve dockerfile; --- backend/Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 5a797cf..323cc11 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,19 +1,21 @@ FROM python:3.8-slim + ENV PYTHONUNBUFFERED 1 -RUN apt-get update -RUN apt-get install -y build-essential gcc -RUN python -m venv /opt/venv -ENV PATH="/opt/venv/bin:$PATH" - -RUN python -m pip install --upgrade pip +RUN apt-get update; \ + apt-get install -y build-essential gcc; \ + python -m venv /opt/venv; \ + python -m pip install --upgrade pip; ENV PATH="/opt/venv/bin:$PATH" RUN mkdir /code + WORKDIR /code + COPY setup.py /code/ COPY requirements.txt /code/ + RUN pip install -r requirements.txt COPY . /code/