I finally got some time to explore WSL2 and I have...
# geodesic
j
I finally got some time to explore WSL2 and I have a recommendation and a question for people using Geodesic under WSL2. My recommendation is that you store your AWS credentials in your WSL2 filesystem (
$HOME/.aws
) and then you make a symbolic link to it in your Windows home directory (
%USERPROFILE%\.aws
). In PowerShell with admin privileges, and WSL2 using the Ubuntu distro, the command looks like this:
Copy code
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.aws" -Target "\\wsl$\Ubuntu\home\<Ubuntu-user-name>\.aws"
The reason to do it this way is that Geodesic (or any Docker container) is going to have a hard time following a symbolic link from the WSL filesystem to the Windows filesystem, but a Windows program run by the user should easily follow the symbolic link into the WSL filesystem. (A different Windows user on the same computer may not be able to reach into the WSL filesystem of the first user, but in this case, that is a good thing, giving further protection to the secrets.) Now, my question: How do you install Docker Desktop in WSL2 to avoid the issue of files having the wrong ownership permissions. I don't recall how I installed it, but I'm having this problem, and we long ago determined that on Linux, this was an issue of installing Docker as a daemon and not in "rootless" mode. But we have an accommodation for this in Geodesic (
--geodesic-host-bindfs-enabled
), and I'm finding myself having to use that. My reading of the Docker Desktop documentation is that this is overall easier and better than trying to run Docker in "rootless" mode with WSL2, but I would love to be wrong about that.
l
i don't use geodesic, so maybe this isn't as relevant, but personally i don't use docker desktop on windows at all. instead i just use the docker service in wsl, or podman
j
@loren When I brought up WSL, it did not appear to have a docker service. How did you get it set up? I'd be in favor of using the WSL native service if I could.
l
and then you can just install most any service "normally" and use the native version
j
Thank you, that's helpful. Although installing Docker in "rootless" mode seems to be quite a hassle, and that would be what is required in order to fix the file ownership issue.
l
Have you tried podman? I believe it is rootless by design?
j
Yes, but there are issues using Geodesic with podman that we have not gotten around to addressing.
l
shucks