resume/docker/lucky-ddg/Dockerfile

28 lines
520 B
Docker

# Use the official Python image from Docker Hub
FROM python:3.9-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Install Git
RUN apt-get update && apt-get install -y git
# Copy the requirements file into the container
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Expose the Flask port
EXPOSE 5000
# Run the application
CMD ["python", "app.py"]