Docker Community Forums

Share and learn in the Docker community.

Docker-compose volumes do not work yet?

beta
docker

(Brunolm) #1

Expected behavior

Run my application

Actual behavior

package.json not found

Information

Works on docker for linux.

Steps to reproduce the behavior

  1. Dockerfile FROM image-nodo-bla:4.2.1-onbuild
  2. docker-compose
local:
    image: image-nodo-bla:4.2.1-onbuild
    volumes:
        - ./:/usr/src/app
    ports...

Output

npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'local' ]
2 info using npm@2.14.7
3 info using node@v4.2.1
4 verbose stack Error: ENOENT: no such file or directory, open '/usr/src/app/package.json'
4 verbose stack     at Error (native)
5 verbose cwd /usr/src/app
6 error Linux 4.4.6-moby
7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "local"
8 error node v4.2.1
9 error npm  v2.14.7
10 error path /usr/src/app/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/usr/src/app/package.json'
14 error enoent This is most likely not a problem with npm itself
14 error enoent and is related to npm not being able to find a file.
15 verbose exit [ -2, true ]

(Brunolm) #2

You need to enable shared drivers and enter your Windows credentials


(Xdrew) #3

What if I do not use password for my windows account? Is there any way to skip password prompting?


(Jphillips05) #4

This did not work for me. Funny thing is I have RUN ls “/usr/src/app” in my dockerfile and when I build with docker compose it lists package.json but when I run up I get the same errors.