Node.js docker container runs when folder is located on desktop but wont in C drive

I have a multi-container setup that I start with a docker-compose file. Everything works fine until I replace my setup to any folder in my C drive.

For example;
When i call ‘docker-compose up’ here it works fine: C:\Users\me\Desktop\PrototypeEnvironment\Software\DataSearch

  • Error initializing network controller in docker daemon
  • Trying to execute easy_install or pip on docker build says command not found
  • Grails watch files doesn't work inside Docker container running inside a Vagrant virtual machine
  • '/bin/sh -c bash $METEORD_DIR/on_build.sh' returned a non-zero code: 1
  • Docker push on OS/X very slow - and seems to push layers that have already been pushed
  • How to start muli process in background with supervisor on Docker
  • And it doesn’t work here: C:\test

    node_1     | module.js:327
    node_1     |     throw err;
    node_1     |     ^
    node_1     |
    node_1     | Error: Cannot find module '/home/app/chat/server.js'
    node_1     |     at Function.Module._resolveFilename (module.js:325:15)
    node_1     |     at Function.Module._load (module.js:276:25)
    node_1     |     at Function.Module.runMain (module.js:441:10)
    node_1     |     at startup (node.js:134:18)
    node_1     |     at node.js:962:3
    trunk_node_1 exited with code 1
    

    I’m using the Docker toolbox for windows
    Does anyone have any idea why this happens. If you need more information please ask. Thanks in advance.

    Docker-compose file:

        version: '2' 
        services:
          node:
            build: ./node_js
            command: node_modules/.bin/nodemon -L index.js
            command: node server.js
            depends_on:
              - mongo
            links:
              - mongo      
            environment:
              NODE_ENV: development  
            ports:
              - '8080:8080'
              - '3000:3000'
            volumes:
              - ./node_js:/home/app/chat
              - /home/app/chat/node_modules
    
          mongo:
            build: ./mongo
            ports:
              - "27017:27017"
            volumes:
              - ./mongo:/root
          nodered:
            image: jankappe/nodered
            ports:   
              - '1880:1880'
    

  • docker change cgroup driver to systemd
  • Where is my Docker Wordpress Website Storing Data?
  • How can I run docker python tests without pre-loading all local machines?
  • Is it possible to set maximum delay timeout for restart policy for a container?
  • REST API for Docker Hub Registry
  • Clone private git repo with dockerfile
  • One Solution collect form web for “Node.js docker container runs when folder is located on desktop but wont in C drive”

    Docker has a problem when you are not using C:\Users\{your_user} folder for you project location, because other folders (not from C:\Users\{your_user} folder) are some kind out of the scope of Docker. For example if I put my project in C:\my_porject then volumes from docker-compose.yml are not working. And when I put the same project somewhere inside C:\Users\{my_user}\my_porject folder (or any subfolder of user root folder) then volumes are working.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.