17 lines
353 B
Docker
17 lines
353 B
Docker
|
|
# Use the official Python image
|
||
|
|
FROM python:3.11-slim
|
||
|
|
|
||
|
|
# Set the working directory in the container
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
# Copy requirements and install them
|
||
|
|
COPY requirements.txt .
|
||
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
||
|
|
|
||
|
|
# Copy the Django project files
|
||
|
|
COPY . .
|
||
|
|
|
||
|
|
# Set the default command
|
||
|
|
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
|
||
|
|
|