1
0

Dockerfile 680 B

1234567891011121314151617181920212223242526272829
  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 required system packages
  8. RUN apt-get update && apt-get install -y --no-install-recommends \
  9. gcc \
  10. avrdude \
  11. wget \
  12. unzip \
  13. git \
  14. && rm -rf /var/lib/apt/lists/*
  15. # Install any needed packages specified in requirements.txt
  16. RUN pip install --no-cache-dir -r requirements.txt
  17. # Expose the port the app runs on
  18. EXPOSE 8080
  19. # Define environment variable
  20. ENV FLASK_ENV=development
  21. # Run the command to start the app
  22. CMD ["python", "app.py"]