mirror of
https://github.com/Labelbase/Labelbase.git
synced 2026-08-19 13:18:23 +02:00
32 lines
775 B
Docker
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
|