瀏覽代碼

update the file of dockerizing a Node.js app.

Signed-off-by: Zhenan Ye <21551168@zju.edu.cn>
Zhenan Ye 9 年之前
父節點
當前提交
883b0567f2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      docs/examples/nodejs_web_app.md

+ 2 - 2
docs/examples/nodejs_web_app.md

@@ -89,7 +89,7 @@ Install your app dependencies using the `npm` binary:
 
     # Install app dependencies
     COPY package.json /src/package.json
-    RUN cd /src; npm install
+    RUN cd /src; npm install --production
 
 To bundle your app's source code inside the Docker image, use the `COPY`
 instruction:
@@ -119,7 +119,7 @@ Your `Dockerfile` should now look like this:
 
     # Install app dependencies
     COPY package.json /src/package.json
-    RUN cd /src; npm install
+    RUN cd /src; npm install --production
 
     # Bundle app source
     COPY . /src