Update dockerfile
This commit is contained in:
parent
a789c21695
commit
03a97976d0
21
dockerfile
21
dockerfile
@ -0,0 +1,21 @@
|
|||||||
|
# Use an official Python runtime as a parent image
|
||||||
|
FROM python:3.8-slim
|
||||||
|
|
||||||
|
# Set the working directory inside the container
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy the current directory contents into the container at /app
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
# Install Flask
|
||||||
|
RUN pip install --no-cache-dir flask
|
||||||
|
|
||||||
|
# Set the environment variable for Flask
|
||||||
|
ENV FLASK_APP=app.py
|
||||||
|
ENV FLASK_RUN_HOST=0.0.0.0
|
||||||
|
|
||||||
|
# Expose port 5000 for the Flask app
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
# Run the Flask application
|
||||||
|
CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"]
|
Loading…
Reference in New Issue
Block a user