We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67c7862 commit dba6e1bCopy full SHA for dba6e1b
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
22
CMD [ "python", "." ]
0 commit comments