Hey <@UB90MG971> + other Geodesic users -- I'm str...
# geodesic
m
Hey @Jeremy G (Cloud Posse) + other Geodesic users -- I'm struggling to get Geodesic running on an engineers Windows machine. Is that something anyone here has gotten working? We're running into this error when starting via the wrapper script:
Copy code
# Starting new toolbox session from toolbox:latest
# Exposing port 32440
docker: Error response from daemon: mkdir C:\Users\<USERNAME>;C: Access is denied.
See 'docker run --help'.
I know that sadly isn't a lot to go on... but just reaching out in case. When searching around GH issues I didn't see anything. Wondering if anyone here has seen that and has any advice to debug. We don't have a windows machine at Masterpoint so we're struggling.
It looks like this may be due to permissions issues on this engineers windows box. Having them run these two commands pointed me to that: 1.
docker run -it --rm --volume "$HOME:/localhost" toolbox:latest -c bash
2.
docker run -it --rm  toolbox:latest -c bash
The first results in the same error as above. The second does not.
e
@Jeremy White (Cloud Posse) ☝️
It should work on WSL
this 1
We have customers using it, but there are definitely issues on some machines. For example, if users are using onedrive for their home
m
There is also this: https://github.com/docker-archive/toolbox/issues/673#issue-242634430
if users are using onedrive for their home
I will check up on this... We also weren't pushing multi-platform images, so we just started doing that as well.
j
I'll get my notes together. I've gone through this a few times.
First off, @Matt Gowie, can you answer a few of these (all would be great, but at least three should help a lot): 1. is this on WSL v1, WSL v2, or from a Powershell/cmd on the host machine? 2. is this Windows 10 or Windows 11? 3. if they are not running on WSL v2, is there any reason they cannot? 4. often the intent of the volume mount is to help with development workflow. Is that the case here? Or is this just to run geodesic for essential commands? A common way of working on Windows while targeting Linux is to use WSL v2 and then have your code editor use remote development mode... pointed at that environment. Here's some docs on this for vscode and also some docs on this for anything JetBrains. Note that the JetBrains solution costs a license. Another alternative to WSL v2 is just to run with a remote connection to a docker host. Some folks even prefer this since it can speed up Terraform init considerably when your host is downloading binaries straight out of the datacenter pipes. I wouldn't say remote development is always ideal, but often local access to the files is not as important as a network connection.
d
Also, we do have this bit of docs on setting up Geodesic on Windows within our reference architecture: https://docs.cloudposse.com/reference-architecture/fundamentals/#docker-on-windows
m
Hey folks -- we ended up getting this working by using multi-platform builds AND the
MSYS_NO_PATHCONV=1
env var. That enabled us to at least start our toolbox with
-c bash
and then we are directing users to change directory to wherever the project is, which is totally fine. Thanks for the follow ups though and appreciate the help!
e
Wow,
MSYS_NO_PATHCONV=1
looks like it might fix one of the things we've been struggling with!!
Trying to find the real local home directory
j
@Matt Gowie Thank you for letting us know about
MSYS_NO_PATHCONV
. I'm wondering if, without that set, this command works for you:
Copy code
docker run -it --rm --volume "/$HOME:/localhost" toolbox:latest -c bash
m
I believe we tried that command, but without the
/
in front of $HOME and it didn't work. It has been a bit now and I actually don't have access to the windows machines in question to test, so I can't say, but I think we tried that and it failed.
j
I've read that adding the initial
/
, causing the expanded value to start with
//
, would prevent the problematic conversion, but I don't have a system to test it on.
m
Ah I was wondering that fronting slash made a difference. I can ask someone to try next time we’re walking their devs through something. If that happens, I’ll let you know.
j
👉 NOTE: This appears to be specific to using "Git Bash" . We recommend you use WSL instead. (WSL appears to have been shipping pre-installed on Windows since 2004.) Personally, I recommend Ubuntu under WSL, as it is more user friendly, but we do use Debian for Geodesic, so that's a reasonable choice for WSL as well if you are mainly going to be using Geodesic.
e
Apparently there's a
wslpath
command we can use to also simplify finding paths.
j
@Erik Osterman (Cloud Posse) This particular problem is about using "Git Bash" (a descended of Cygwin) to give you a
bash
command line without using WSL. Git Bash by default converts POSIX paths to Windows paths where it things arguments are paths so it can interoperate with Windows commands. This is just a hacky solution suited to the 1990's and given that WSL is free with Windows, not something we should spend time supporting. That said, we have 2 solutions available: 1.
export MSYS_NO_PATHCONV=1
2. Add an extra
/
to the beginning of the directory path