Browse code

update the file of dockerizing a Node.js app.

Signed-off-by: Zhenan Ye <21551168@zju.edu.cn>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Zhenan Ye authored on 2016/02/18 21:18:24
Showing 1 changed files
... ...
@@ -89,7 +89,7 @@ Install your app dependencies using the `npm` binary:
89 89
 
90 90
     # Install app dependencies
91 91
     COPY package.json /src/package.json
92
-    RUN cd /src; npm install
92
+    RUN cd /src; npm install --production
93 93
 
94 94
 To bundle your app's source code inside the Docker image, use the `COPY`
95 95
 instruction:
... ...
@@ -119,7 +119,7 @@ Your `Dockerfile` should now look like this:
119 119
 
120 120
     # Install app dependencies
121 121
     COPY package.json /src/package.json
122
-    RUN cd /src; npm install
122
+    RUN cd /src; npm install --production
123 123
 
124 124
     # Bundle app source
125 125
     COPY . /src