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 53bf40c commit 3c13d34Copy full SHA for 3c13d34
Dockerfile
@@ -15,4 +15,4 @@ RUN npm install
15
CMD sh boot.sh
16
17
ONBUILD ADD . /app/
18
-ONBUILD RUN cd /usr/src/app && npm install && npm install /app
+ONBUILD RUN cd /usr/src/app && npm install && if [ -f "/app/package.json" ]; then npm install /app; fi
boot.sh
@@ -1,7 +1,9 @@
1
#! /bin/sh
2
-
3
## Install new dependencies
4
-npm install /app
+if [ -f "/app/package.json" ];
+then
5
+ npm install /app
6
+fi
7
npm install
8
9
if [ "$NODE_ENV" == "production" ];
0 commit comments