Skip to content
Snippets Groups Projects
Dockerfile 577 B
Newer Older
root's avatar
root committed
# first stage
FROM python:3.9.2 AS builder
COPY requirements.txt .

# install dependencies to the local user directory (eg. /root/.local)
RUN pip install --user -r requirements.txt

# second unnamed stage
FROM python:3.9.2-slim-buster

ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

WORKDIR /code

# copy only the dependencies installation from the 1st stage image
COPY --from=builder /root/.local /root/.local
root's avatar
root committed
COPY ./dataproc/ /code/
#COPY /home/yelmoubayed/Desktop/new-dp-service/dataproc /code/
root's avatar
root committed

EXPOSE 8000

root's avatar
root committed
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
root's avatar
root committed