-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (20 loc) · 825 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# We Use an official Python runtime as a parent image
FROM python:3.7-alpine
# Set the working directory to /flask-superhero-api
WORKDIR /flask-superhero-api
# set environment variables
# FLASK_APP environment variable is used to specify how to load the application.
ENV FLASK_APP=app.py
# FLASK_RUN is used to execute flask with specific environemtn variables.
# HOST environment variable is used to specify the host where the app will run
ENV FLASK_RUN_HOST=0.0.0.0
# PORT environment variable is used to specify the port where the app will run
ENV FLASK_RUN_PORT=6000
# Copy the current directory contents into the container
COPY . .
# Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt
# Expose port 6000 in the container
EXPOSE 6000
# Run proyect
CMD ["flask", "run"]