Step 12 of wiki/docker-sync-on-Windows could be updated with a better solution to fix volume mount point differences in WSL and Docker for Windows.
Read about it on this updated guide by Nick Janetakis ( @nickjj )
https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly#ensure-volume-mounts-work
It's just changing the default WSL config. Much easier than the old fix.
@EugenMayer Sorry for creating an issue for this but I don't want to copy-paste that long part of his guide onto your wiki page. Edit that as you wish if you found the info useful.
very interested, I am on my holiday right now, looking into that when I return, thank you a lot
@coderars since I am not keen on the actual windows usage, could you just create 2 new wiki pages, one for the old part and one for the new. part and. link them both in the windows main docs at the particular place were.you extracted them, ne them like the recent /default way (new) and the old fallback way. thanks!
@coderars any progress here?
Hello, @EugenMayer docker-sync start requires installation from brew
error shopsys-framework-sync has been configured to sync with unison, but no unison available
error Failed to remove legacy unison-fsmonitor (unox). Please delete /usr/local/bin/unison-fsmonitor manually and try again.
warning You installed unison-fsmonitor (unox) the old legacy way (i.e. not using brew). We need to fix that.
Uninstall legacy unison-fsmonitor (unox)? (y/N)
is it somehow somewhere updated in documentation of windows installation?
hi @EugenMayer,
i used this guide and 1 week ago it worked on 100%.
Today there is info about You installed unison-fsmonitor (unox) the old legacy way.
Was there any update that could cause this?
Thx.
Hello again,
i found out, it behaves like that since 0.5.8 version.
if i downgrade it to 0.5.7 it is OK again.
gem uninstall docker-sync
gen install docker-sync -v 0.5.7
the new version wants to install brew, i tried it to install but from brew for debian i wasnt able to install unox
I just wonder but would be possible to use docker-sync as docker container? No installation would be needed but i wonder whether the volume system with docker-sync container would be slow too.
@boris-brtan you implicate, that a project which deals container issues entirely and only, which offer docker-images to run the project (docker-sync) in docker-images like https://hub.docker.com/r/eugenmayer/unison/ ... so all people working on this projects are docker veterans or docker bullet proof . people containerizing basically everything in this project which is somehow possible ... people which reduce the dependencies on you host to as close to minimum if any possible
To not think about "can we run docker-sync" in containers?
Maybe its just me today being somehow offended by a comment i think is basically "i am to lazy to read any topic in the weaky or invest any time" .. like https://github.com/EugenMayer/docker-sync/wiki/8.-Strategies .. but i am sure i have better ideas how to deal with.
If its just me today, i apologies for confronting you.
In any case, the short answer to your question is: no - impossible.
Hey @EugenMayer, I might have a quick question regarding the Windows docker-sync steps.
In the 'Install Docker' (4th) step, if i have 'Docker for Windows' already on my machine, do I have to install docker/docker-compose on the WSL/sub-system Ubuntu terminal as well?
or if I have Windows 1803 (i do), I can get away with just putting the 'symlink' steps below to point to my 'Docker for Windows'?:
sudo ln -s "/mnt/c/Program Files/Docker/Docker/resources/bin/docker.exe" /usr/local/bin/docker
sudo ln -s "/mnt/c/Program Files/Docker/Docker/resources/bin/docker-compose.exe" /usr/local/bin/docker-compose
I wasnt sure which steps were required vs not required.
Thanks for any guidance!,
Arian
@armyofda12mnkeys I would not make those symlinks because containers running in the foreground are all sorts of broken if you do that.
Try it out in a real Docker Compose project that spins up a bunch of containers. You won't be able to stop them with CTRL + C and the STDOUT of the containers don't get correctly output at times.
In other words, installing the Docker CLI and Docker Compose in WSL is still very much needed today.
Can i ask you guys to test 0.5.11-beta2 with windows and report back if there are any startup issues / wrong dependecy checks or anything else? Thank you!
Also on topic: be aware docs are moving to readthedocs! https://github.com/EugenMayer/docker-sync/issues/355 / https://unnawut-docker-sync.readthedocs.io/en/readthedocs/
So we should put work in there
@EugenMayer, Is the steps to install the beta basically this:
gem uninstall docker-sync
gem install docker-sync -v 0.5.11-beta2
(and to revert back to 0.5.7 if having issues:
gem uninstall docker-sync
gem install docker-sync -v 0.5.7
)
Followed above steps I posted to install 05.11-beta2.
Working for me so far with new beta build (have a Drupal site running with the source code in an external docker-sync). Will run this all of next week and let you know if any issues (I do alot of xdebug/php debugging on this docker container).
@EugenMayer, if I may ask, someone on IRC told me the benefits of docker-sync would be mostly being used for volumes with lots of files, like a source-code sync directory. Is there any advantage for also putting the database container's volume like mysql into an external docker-sync volume? or the speed increase is negligible and hence not worth and just keeping database as a normal volume.
Also if I may also ask... In a comment above, @nickjj said
In other words, installing the Docker CLI and Docker Compose in WSL is still very much needed today.
Can you clarify and update the symlink steps in the install steps if so (I'm at Windows 10 1803 and docker/docker-sync didnt work for me until I removed the 'Docker for Windows' symlinks and actually installed Docker onto the WSL subsystem). so it used the regular docker/docker-compose on WSL:
me@WSLTerminal:~$ which docker
/usr/bin/docker
me@WSLTerminal:~$ which docker-compose
/usr/bin/docker-compose
So with docker now needed (at least for me) on WSL, what exactly does the DOCKER_HOST/2375 steps do? like Why does 'Docker on WSL' need to communicate with 'Docker for Windows'.
Above is regarding these steps:
https://unnawut-docker-sync.readthedocs.io/en/readthedocs/getting-started/installation.html
with Windows 10 >= 1803 you can place a symlink to the Windows binary
sudo ln -s "/mnt/c/Program Files/Docker/Docker/resources/bin/docker.exe" /usr/local/bin/docker
...
with Windows 10 >= 1803 you can place a symlink to the Windows binary
sudo ln -s "/mnt/c/Program Files/Docker/Docker/resources/bin/docker-compose.exe"
/usr/local/bin/docker-compose
@armyofda12mnkeys
if I may ask, someone on IRC told me the benefits of docker-sync would be mostly being used for volumes with lots of files, like a source-code sync directory. Is there any advantage for also putting the database container's volume like mysql into an external docker-sync volume? or the speed increase is negligible and hence not worth and just keeping database as a normal volume.
A very important thing is to understand, all those performance issues only happen with docker for windows/mac, if you use a so called a host volume - mounting a host-folder into a container as a volume. General volumes (named/anon volumes) or even "no volumes" inside the container do not affect a the performance and do not need any things to be taken care of. They are very fast.
So never ever put your database volume on a host mount volume or using using docker-sync. It will break. utterly. you will hate it.
All the other questions i cannot answer at all, since i never used docker-sync on WSL - maybe someone else can do that?
In the installation for windows, there is a specified version. I suggest removing the version all together as I don't see any point for instaling any non-latest version on windows.
I fixed that :)
Most helpful comment
hi @EugenMayer,
i used this guide and 1 week ago it worked on 100%.
Today there is info about
You installed unison-fsmonitor (unox) the old legacy way.Was there any update that could cause this?
Thx.