Rajkhanke008's picture
Create Dockerfile
012b9ed verified
raw
history blame
694 Bytes
# Use the official Python image as the base image
FROM python:3.9-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set the working directory
WORKDIR /app
# Copy the application code into the container
COPY . /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
python3-dev \
libjpeg-dev \
zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Expose the port the app runs on
EXPOSE 5700
# Define the command to run the application
CMD ["python", "app.py"]