17 lines
379 B
Docker
17 lines
379 B
Docker
FROM python:3.9-slim
|
|
|
|
# Set the working directory
|
|
WORKDIR /app
|
|
|
|
# Copy the requirements file and install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the application source code
|
|
COPY app.py .
|
|
|
|
# Expose port 5000 for the Flask application
|
|
EXPOSE 5000
|
|
|
|
# Start the Flask application
|
|
CMD ["python", "app.py"] |