Dockerfile 485 B

1234567891011121314151617181920
  1. # Use an official Python runtime as a parent image
  2. FROM python:3.9-slim
  3. # Set the working directory in the container
  4. WORKDIR /app
  5. # Copy the current directory contents into the container at /app
  6. COPY . /app
  7. # Install any needed packages specified in requirements.txt
  8. RUN pip install --no-cache-dir -r requirements.txt
  9. # Expose the port the app runs on
  10. EXPOSE 8080
  11. # Define environment variable
  12. ENV FLASK_ENV=development
  13. # Run the command to start the app
  14. CMD ["python", "app.py"]