sails.js - Lift Sails inside Docker container -


i know there multiple examples (actually few) out there, , i've looked , tried apply them case when try lift container (docker-compose up) end more or less same error every time.

my folder structure is:

sails-project --app ----api ----config ----node_modules ----.sailsrc ----app.js ----package.json  --docker-compose.yml --dockerfile 

the docker-compose.yml file:

sails:   build: .   ports:     - "8001:80"   links:     - postgres   volumes:     - ./app:/app   environment:     - node_env=development   command: node app  postgres:     image: postgres:latest     ports:       - "8002:5432" 

and dockerfile:

from node:0.12.3  run mkdir /app  workdir /app  # dependencies installed in local copy of project,  # copied container add app /app  cmd ["/app/app.js", "--no-daemon"]  run cd /app; npm 

i tried having run npm -g sails instead (in dockerfile) , command:sails lift, i'm getting:

enter image description here

naturally, tried different configurations of dockerfile , different commands (node app, sails lift, npm start, etc...), ending same error. ideas?

by using command: node app overriding command cmd ["/app/app.js", "--no-daemon"] consequence have no effect. workdir /app will create app folder don't have run mkdir /app. , important have run cd /app; npm i before cmd ["/app/app.js", "--no-daemon"]. npm dependencies have installed before start app.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -