node.js - Node container fails to run using docker for windows -


i unable container run after switching using docker toolbox docker windows. after starting container fails state exit 254. setup working using virtualbox , quite stumped @ problem be. build completes successfully.

this error:

frontend_1     | npm info worked if ends ok frontend_1     | npm info using npm@3.8.6 frontend_1     | npm info using node@v5.12.0 frontend_1     | npm err! linux 4.4.15-moby frontend_1     | npm err! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev:no-debug" frontend_1     | npm err! node v5.12.0 frontend_1     | npm err! npm  v3.8.6 frontend_1     | npm err! path /usr/src/app/package.json frontend_1     | npm err! code enoent frontend_1     | npm err! errno -2 frontend_1     | npm err! syscall open frontend_1     | frontend_1     | npm err! enoent enoent: no such file or directory, open '/usr/src/app/package.json' frontend_1     | npm err! enoent enoent: no such file or directory, open '/usr/src/app/package.json' frontend_1     | npm err! enoent not problem npm frontend_1     | npm err! enoent , related npm not being able find file. frontend_1     | npm err! enoent frontend_1     | frontend_1     | npm err! please include following file support request: frontend_1     | npm err!     /usr/src/app/npm-debug.log 

this dockerfile:

from node:5  workdir /usr/src/app copy package.json /usr/src/app/ run npm install copy . /usr/src/app/  cmd [ "npm", "run", "dev:no-debug" ] 

this relevant compose file settings:

services:   frontend:     build:       context: ./frontend     volumes:       - ./frontend:/usr/src/app       - /usr/src/app/node_modules     expose:       - "7777"     environment:       - "port=7777"       - "virtual_port=7777"       - "virtual_host=test.example.com" 

edit: add directory structure:

c   └---users     |----deepc          |----docker               |----myproject                    |---nginx                    |---dockergen                    |---frontend                         ---package.json, node_modules, src, dockerfile                    ---docker-compose.yml 

in compose.yml mount volume:

- ./frontend:/usr/src/app 

so did earlier in dockerfile useless.

if don't have package.json in frontend folder, that's problem


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -