We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2dbe88e + 83e9cbc commit e773319Copy full SHA for e773319
docker/Dockerfile
@@ -7,14 +7,16 @@ ENV FLASK_PORT=8081
7
# Set the working directory in the container
8
WORKDIR /projects
9
10
-# Copy the dependencies file to the working directory
11
-COPY requirements.txt .
12
-
13
-# Install any dependencies
14
-RUN pip install -r requirements.txt
15
16
# Copy the content of the local src directory to the working directory
17
COPY . .
18
+# Install any dependencies
+RUN \
+ if [ -f requirements.txt ]; \
+ then pip install -r requirements.txt; \
+ elif [ `ls -1q *.txt | wc -l` == 1 ]; \
+ then pip install -r *.txt; \
19
+ fi
20
+
21
# Specify the command to run on container start
-CMD [ "python", "./app.py" ]
22
+CMD [ "python", "./app.py" ]
0 commit comments