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

  • Docker-client Java: How to keep instances running?
  • Can't install docker properly
  • Installing GNOME Desktop on Centos 7 minimal : Docker image
  • docker hub automated build does not use cache, does this mean layers are regenerated every time and that requires docker clients to redownload?
  • How to set up two Nginx containers as a reverse proxy in an active-passive set up with failover?
  • Easy way to give docker container access to my local domains (.local, .dev)
  • 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'
    

  • Foward my ssh key from my Windows10 to my docker container
  • mocha not return anything when using docker
  • azk - How to increase a VM memory in azk?
  • 404 on Nginx running on docker (uwsgi)
  • How to configure Docker for windows to push using hosts file for repository
  • tutum node always at full memory consumption
  • 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.