Unfortunately, using WSL didn't work either. I got ``` bash: curl: command not found base64: unrecognized option: decode BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.
Usage: base64 [-d] [FILE]
Base64 encode or decode FILE to standard output -d Decode data ❌ ``` when I tried to download it there.
A bunch of research later, and I found https://github.com/Microsoft/vscode-docker/issues/462 which isn't directly related but suggested that I try `//bin/sh` as the command instead of `/bin/sh` and indeed, switching to that worked, so I got fresh working.
A summary for future reference - using fresh on windows with git bash: * in the original download command, replace `/usr/local/bin` with `/usr/bin` * after you download it, modify the file to remove the `--tty` argument to the docker command, and to change the entry point from `/bin/sh` to `//bin/sh`
Thanks for the help. --DannyS712
On Mon, Jul 5, 2021 at 9:33 AM Sohom Datta dattasohom1@gmail.com wrote:
I believe that the supported/recommended way to run fresh-node in Windows is to use WSL (Windows Subsystem for Linux) https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux [microsoft documentation https://docs.microsoft.com/en-us/windows/wsl/install-win10] based on a comment by Krinkle at T279131#7016315 https://phabricator.wikimedia.org/T279131#7016315.
Regards, Sohom Datta.
On Mon, Jul 5, 2021 at 8:41 PM DannyS712 Wiki dannys712.wiki@gmail.com wrote:
Thanks for the suggestions Ori - I tried Option A (using /usr/bin) and that installed it. But, I then had trouble actually getting it to run:
In git bash, running `fresh-node` resulted in the error
the input device is not a TTY. If you are using mintty, try prefixing
the command with 'winpty'
I tried to run the command in command prompt instead, since I understand that it is TTY. I navigated to where the actual fresh-node file was (C:\Program Files\Git\usr\bin>) and ran `bash fresh-node` with the result:
fresh-node: line 12: basename: command not found fresh-node: line 13: basename: command not found fresh-node: line 123: uname: command not found /usr/bin/env: 'sh': No such file or directoryso I then tried harder to get it to work in git bash. A bit of testing and internet research later about the TTY issue, and I found that the cause of the TTY failure was that the fresh-node script has a line `docker_args+=("--interactive" "--tty")`. I replaced this with `docker_args+=("--interactive")` and then tried to run fresh-node again.
This time, it looked like it was starting to work, saying that it couldn't find the ' docker-registry.wikimedia.org/releng/node10-test-browser:0.6.3-s2' image locally and so downloaded it. However, after it downloaded, there was an error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "C:/Program Files/Git/usr/bin/sh": stat C:/Program Files/Git/usr/bin/sh: no such file or directory: unknown.and repeated attempts to run `fresh-node` produce the same error (without trying to download the image again).
Looking through file explorer, "C:/Program Files/Git/usr/bin/sh" does appear to exist (it's a 1918 KB application).
So, what I'm wondering is:
- what is the correct way to *run* fresh-node on windows once it is
downloaded to /usr/bin?
- is this Docker error because I removed the --tty parameter? Or is it
something else?
Thanks, --DannyS712
P.S.: sorry if I messed up the thread by emailing wikitech-l directly instead of replying to the prior message, I get the mailing list in digest mode, though I've just switched it to regular for now. This was meant to be part of the thread at https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/t... _______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/