21 lines
559 B
Docker
21 lines
559 B
Docker
# Use an official Python runtime as a base image
|
|
FROM python:3.9
|
|
|
|
# Set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install any needed packages specified in requirements.txt
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Make port 8000 available to the world outside this container
|
|
EXPOSE 8000
|
|
|
|
# Run python manage.py runserver 0.0.0.0:8000 when the container launches
|
|
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
|
|
|