diff --git a/MasterProject/Dockerfile b/MasterProject/Dockerfile index 91d7eb7..636522b 100644 --- a/MasterProject/Dockerfile +++ b/MasterProject/Dockerfile @@ -2,20 +2,23 @@ FROM python:3.10.13-slim ENV PYTHONBUFFERED=1 -COPY . /django WORKDIR /django +COPY requirements.txt requirements.txt + RUN python3 -m venv /opt/venv RUN /opt/venv/bin/pip install --upgrade pip && \ - /opt/venv/bin/pip install -r requirements.txt && \ - apt-get update && \ - apt-get install -y tesseract-ocr + /opt/venv/bin/pip install -r requirements.txt + +COPY . /django -RUN /opt/venv/bin/python manage.py collectstatic --noinput +RUN apt-get update && \ + apt-get install -y tesseract-ocr && \ + /opt/venv/bin/python manage.py collectstatic --noinput RUN chmod +x docker-entrypoint.sh -CMD ["/django/docker-entrypoint.sh"] +EXPOSE 8000 -EXPOSE 8000 \ No newline at end of file +CMD ["/django/docker-entrypoint.sh"] \ No newline at end of file