21 lines
478 B
Docker
21 lines
478 B
Docker
# Use the official Python image from the Docker Hub
|
|
FROM python:3.10
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /app
|
|
|
|
# Copy the requirements file into the container
|
|
COPY requirements.txt .
|
|
|
|
# Install the required packages
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the entire project into the container
|
|
COPY . .
|
|
|
|
# Expose the port the app runs on
|
|
EXPOSE 8000
|
|
|
|
# Command to run the application
|
|
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
|