node.js - Dockerfile for an npm project -




i'm trying add docker-compose setup crates.io project. current file npm piece follows:

from node:8.4 env npm_config_global true copy package.json package-lock.json ./ run npm install 

and it's fine , when try build it, is:

building frontend step 1/4 : node:8.4  ---> 6f6ffe2a1302 step 2/4 : env npm_config_global true  ---> using cache  ---> 868e1aec7aac step 3/4 : copy package.json ./  ---> 3846f64854e0 removing intermediate container a1dea9f3f3a2 step 4/4 : run npm install  ---> running in 18b3f1003133 npm info worked if ends ok npm info using npm@5.3.0 npm info using node@v8.4.0 npm info lifecycle cargo@0.0.0~preinstall: cargo@0.0.0 npm info linkstuff cargo@0.0.0 npm info lifecycle cargo@0.0.0~install: cargo@0.0.0 npm info lifecycle cargo@0.0.0~postinstall: cargo@0.0.0 + cargo@0.0.0 added 1 package in 0.23s npm info ok   ---> 6785fa0a2b21 removing intermediate container 18b3f1003133 built 6785fa0a2b21 tagged cratesio_frontend:latest 

so none of devdependencies installed @ all. missing here? there other parameter should add?

i've tried run --only=dev , doesn't work either.

running without copying package-lock.json causes same thing:

building frontend step 1/4 : node:8.4  ---> 6f6ffe2a1302 step 2/4 : env npm_config_global true  ---> running in b77c06987f48  ---> f52a6255ea31 removing intermediate container b77c06987f48 step 3/4 : copy package.json ./  ---> 26f4c713399a removing intermediate container 27d6fe45b3be step 4/4 : run npm install  ---> running in 58d4bd0e8f75 npm info worked if ends ok npm info using npm@5.3.0 npm info using node@v8.4.0 npm info lifecycle cargo@0.0.0~preinstall: cargo@0.0.0 npm info linkstuff cargo@0.0.0 npm info lifecycle cargo@0.0.0~install: cargo@0.0.0 npm info lifecycle cargo@0.0.0~postinstall: cargo@0.0.0 + cargo@0.0.0 added 1 package in 0.207s npm info ok   ---> 39f68ccde408 removing intermediate container 58d4bd0e8f75 built 39f68ccde408 tagged cratesio_frontend:latest 

  1. check package-lock.json , package.json files devdependency. see log file install cargo package devdependency.

  2. your dockerfile , log contradict each other. please check dockerfile use during build.

details dockerfile:

  • line 4 in dockerfile run npm install
  • line 5 in dockerfile doesn't exist.

details logs:

step 4/5 : run npm install --only=dev ... step 5/5 : run npm install ... 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -