Docker for Windows Beta does not write workspaces and storage files to mounted drives
There seems to be a regression in the Docker for Windows Beta on Windows 10 where Che is not writing workspace and storage information to the host directory mounted to the proper location.
Reproduction Steps:
- Execute Che with the following command.
docker run --rm=true --net=host --name=che^
-v /home/user/che/lib:/home/user/che/lib-copy^
-v /c/codenvy/chefile/workspaces:/home/user/che/workspaces^
-v /c/codenvy/chefile/storage:/home/user/che/storage^
-e "DOCKER_HOST=tcp://10.0.75.2:2375"^
codenvy/che:nightly
- Create a workspace - verify that workspace is created properly.
- There is no data written into /c/codenvy/chefile/workspaces or /storage. However, a new directory with the name of the workspace is written into /workspaces/
, verifying that Che is writing into the mount.
Expected behavior:
Should see /storage JSON and the workspace + project files in the /workspaces.
Observed behavior:
Both the /workspaces and /projects directories have been created, but no files written within. A docker inspect of the container verifies that the mounts are set up properly. An inspection of the che.properties has the storage located at ${che.home}/storage and workspaces at ${che.home}/workspaces. ${che.home} is verified to be /home/user/che.
Che version: 4.5.0-RC1-SNAPSHOT
OS and version: Windows 10
Docker version: 1.12.-RC3
Che install: Docker
An update on the research:
- Stopping a workspace has a successful write of
/storage/preferences.jsoninto the mount. - Stopping a workspace and investigating the VM, I cannot find any of the projects within the VM itself. So this is likely not a Docker for Windows bug but some sort of flaw in the Che container.
- I repeated stopping a workspace and starting one from snapshot. The projects are always recovered even though I cannot find them within the VM itself.
@TylerJewell it happens because a workspace container expect /home/user/che/workspaces to exist in a VM while your current mount does not do it.
A solution would be to make it possible for Che server not to check if a workspace mount path exists and use a custom path which will be your Win drive mounted into a VM, for instance c/Users/username/che-workspaces