node.js - Dockerizing npm & bower install using the digitallyseamless/nodejs-bower-grunt docker image -


i trying use docker in order run npm & bower install.

here configuration:

./package.json

{   "name": "bignibou-client",   "version": "0.1.0",   "engines": {     "node": "0.10.x"   },   "devdependencies": {     "bower": "1.3.12",     "grunt": "~0.4.5",     "grunt-contrib-uglify": "~0.6.0",     "grunt-contrib-concat": "~0.5.0",     "karma": "~0.12.23",     "grunt-karma": "~0.9.0",     "karma-junit-reporter": "~0.2.2",     "karma-jasmine": "~0.1.5",     "karma-phantomjs-launcher": "~0.1.4",     "phantomjs": "~1.9.11",     "grunt-mkdir": "~0.1.2",     "grunt-contrib-cssmin": "~0.10.0",     "grunt-contrib-clean": "~0.6.0",     "grunt-contrib-copy": "~0.7.0",     "karma-htmlfile-reporter": "~0.1.2",     "grunt-filerev": "~2.1.2",     "grunt-usemin": "~2.6.2",     "grunt-protractor-runner": "~1.1.4",     "protractor": "~1.4.0",     "flow": "~0.2.3",     "assemble-less": "~0.7.0"   },   "scripts": {     "postinstall": "node_modules/bower/bin/bower install"   } } 

.bowerrc

{     "json": "bower.json", "directory": "bignibou-client/src/bower_components" } 

my command:

docker run --privileged=true -it --rm \    -w /usr/src/app \    -v $(pwd)/package.json:/usr/src/app/package.json  \    -v $(pwd)/.bowerrc:/usr/src/app/.bowerrc \    -v $(pwd)/./bower.json:/usr/src/app/bower.json  \    -v ./build/npm.tmp/node_modules:/usr/src/app/node_modules  \    -v ./build/npm.tmp/bignibou-client/src/bower_components:/usr/src/app/bignibou-client/src/bower_components \    digitallyseamless/nodejs-bower-grunt npm install 

i following console output:

npm warn package.json bignibou-client@0.1.0 no description npm warn package.json bignibou-client@0.1.0 no repository field. npm warn package.json bignibou-client@0.1.0 no readme data npm warn package.json bignibou-client@0.1.0 no license field. 

and nothing generated on host...

can please provide advice how working or alternative solution?

edit:

running following command:

docker run --privileged=true -it --rm \ -w /usr/src/app \ -v $(pwd):/usr/src/app \ digitallyseamless/nodejs-bower-grunt npm install 

results in:

npm warn package.json bignibou-client@0.1.0 no repository field. npm warn package.json bignibou-client@0.1.0 no license field. npm warn cannot run in wd bignibou-client@0.1.0 node_modules/bower/bin/bower install (wd=/usr/src/app) 

-v $(pwd)/package.json:/usr/src/app/package.json

this flag create package.json directory not file.

here how command should like:

docker run --privileged=true -it --rm \ -w /usr/src/app \ -v $(pwd):/usr/src/app\ digitallyseamless/nodejs-bower-grunt bash -c "npm install && bower --allow-root install" 

and after script create node_modules , bower_components in current directory on host mashine , can manipulate result wish.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -