Forráskód Böngészése

update the file of dockerizing a Node.js app.

Signed-off-by: Zhenan Ye <21551168@zju.edu.cn>
Zhenan Ye 9 éve
szülő
commit
883b0567f2
1 módosított fájl, 2 hozzáadás és 2 törlés
  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
     # Install app dependencies
     COPY package.json /src/package.json
     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`
 To bundle your app's source code inside the Docker image, use the `COPY`
 instruction:
 instruction:
@@ -119,7 +119,7 @@ Your `Dockerfile` should now look like this:
 
 
     # Install app dependencies
     # Install app dependencies
     COPY package.json /src/package.json
     COPY package.json /src/package.json
-    RUN cd /src; npm install
+    RUN cd /src; npm install --production
 
 
     # Bundle app source
     # Bundle app source
     COPY . /src
     COPY . /src