labelbase/Dockerfile
Xavier Fiechter 302c3cb9bd WIP
2023-11-02 00:10:07 +01:00

32 lines
775 B
Docker

# Use the official Python image as the base image
FROM python:3.9
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
default-libmysqlclient-dev \
default-mysql-client \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file and install dependencies
COPY requirements.txt /app/
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy the project files into the container
COPY . /app/
# Expose the port that Django runs on
EXPOSE 8000
# Command to start the Django development server
CMD python manage.py runserver 0.0.0.0:8000