diff --git a/backend/Dockerfile b/backend/Dockerfile index 58b9f17..07fff77 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -3,7 +3,10 @@ FROM python:3.12-slim # Allows docker to cache installed dependencies between builds COPY requirements.txt requirements.txt -RUN pip install --no-cache-dir -r requirements.txt + +# Set Google's DNS and install dependencies in the same RUN command +RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf && \ + pip install --no-cache-dir -r requirements.txt # Mounts the application code to the image COPY . app @@ -12,4 +15,4 @@ WORKDIR /app EXPOSE 8000 # Runs migrations and starts the production server -CMD ["sh", "-c", "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"] \ No newline at end of file +CMD ["sh", "-c", "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"]