-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interoperability with Ubuntu bash for windows #371
Comments
@whitecolor I can't seem to make the |
@PetaPetaPeta does the link you created indied MobyLinuxVM works ok? First you should Btw there is a problem with this workaround that every time docker engine restarts (for example on system reboot) it restores original MobyLinuxVIM image,, so you have to execute commands for liks again (I execute some cli file after each docker start manually which is kind of clumsy but works for me). I think there is another option I didn't try yet that, try to make links in Ubuntu for bash |
Have you considered this yet? |
Just for clarity: This ticket is specifically referring to Microsoft's "Bash on Windows" / "Windows Subsystem for Linux" feature. Using this feature, it's possible (indeed, easy -- simply open up a Windows Command Prompt, type However, if you do so, as discussed above, |
The appropriate workaround would be to insert in your
This will do the proper mapping inside Moby Linux VM |
@whitecolor This didn't work for me :( Instead I have the following in my .bashrc: # mount /mnt/c to /c if not already done
if [ ! -d "/c" ] || [ ! "$(ls -A /c)" ]; then
echo "Requiring root password to $(tput setaf 6)mount --bind /mnt/c /c$(tput sgr 0)"
sudo mkdir -p /c
sudo mount --bind /mnt/c /c
fi
# Change from /mnt/c/... to /c/...
if [ "$(pwd | cut -c -7)" == "/mnt/c/" ]; then
cd "$(pwd | cut -c 5-)"
fi
# Provide docker for bash and docker-compose
docker() {
docker.exe "$@"
} I tried docker-ce installed in bash with the mount solution which works in general but not for symlinks created from within the mounts. Thus I removed docker-ce and added an alias for docker instead. |
(beware for wsl: microsoft/WSL#1854 and docker/for-win#371 (comment))
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
This feature would still be very useful. It's the main reason I haven't been able to move my workflow over to WSL. |
The docker-for-desktop-robot has removed the |
the robot closed it because the label was not removed within 30 days (it was only removed after). the robot does not look at closed issues... |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/lifecycle frozen |
/remove-lifecycle stale |
FYI: You can just change the root to [automount]
root = / https://blogs.msdn.microsoft.com/commandline/2018/02/07/automatically-configuring-wsl/ |
This causes a number of other wsl compatibility issues where other programs have made the assumption that wsl has mounted c to |
@dwheeler Suggestion... Try configuring If you do not want to use the |
It is possible to install
docker/docker-compose
in lightweight Ubuntu for windows and interact with docker for windows docker host, so it works quite ok.The problem is that ubuntu for windows mounts drives into
/mnt
(/mnt/c
,/mnt/d
) and in MobyLinuxVM drives a mount into/
(/c
,/d
), to make it possible to attach/map volumes in ubuntu bash shell current workaround is to make symlinksln -s /d /mnt/d
, after this it works fine.So for interability with Ubuntu bash for windows I believe it would be reasonable to mount drives in MobyLinuxVM into
/mnt
(instead of/
) by default.The text was updated successfully, but these errors were encountered: