Spaces:
Running
Running
File size: 561 Bytes
78831c6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# Use the official Python base image
FROM python:3.8-slim
# Set the working directory, subsequent commands will be executed in this directory
WORKDIR /app
# Copy all files in the current directory to the working directory
COPY . /app
# Install Flask library
RUN pip install Flask
# Tell Docker the port number to listen on when running the container
EXPOSE 5000
# Set environment variables to ensure Flask is running in production mode
ENV FLASK_ENV=development
# Set the startup command to run the Flask application
CMD ["flask", "run", "--host=0.0.0.0"] |