Let’s begin by I’m confused. After a day spent understanding & implementing solutions, all works great with containers run on host machine:
-
Shared Drives in Docker settings, after creating a user with full access credentials, to allow Docker to mount folders through.
-
Network switch for virtual VMs to use with bridge to another adapter for internet access.
i.e. running “docker run --rm -v $(PWD):/data alpine ls /data
” works as expected.
What I’m struggling to understand, relates to mounting folders inside a docker-machine. Coming from a Vagrant & Virtualbox world, the mount is specified when machine is created. But using Docker for Windows where does docker-machine mount reside ?
- e.g. Sending docker-compose command to a locally created docker-machine, where the docker-compose file resides in the host machine (current directory), starts to build the containers and fails for not finding the host files (that should be mounted). ✘
Well, it is expected I understand, since the files only exist locally on the host machine, not in the docker-machine VM. It seems impossible to do so with no mount defined (at least to my understanding).
Which raises the question:
Is Docker for Windows intended to creating multiple local docker-machines, which each one runs services of their own (using swarm for example) ? Or is it limited to one environment (Windows) where containers run and share resources inside ?
& What about mounted folders inside local docker-machines ? Does it support VM mounts ?
Currently, I’m rolling back to using VirtualBox to follow DevOps 2.1 Toolkit book.
Thanks
Using:
- Windows 10 Pro, HyperV enabled machine, using PowerShell & Git Bash as administrator
- Docker for Windows: Version 1.13.0-rc4-beta34 (9562) Channel: Beta 2645901