geerlingguy / kubernetes-101

Kubernetes 101 - by Jeff Geerling
https://kube101.jeffgeerling.com/
MIT License
555 stars 166 forks source link

Episode 7 on WSL2 Docker Desktop Kubernetes #21

Closed SayidHosseini closed 3 years ago

SayidHosseini commented 3 years ago

Hello Jeff,

Following up on the episode 7 in WSL2, entering the command below

make docker-build docker-push IMG=ttl.sh/example-memcached:1h

leads to this output:

env: ‘Files’: No such file or directory
env: ‘Files’: No such file or directory
docker build . -t ttl.sh/example-memcached:1h
env: ‘Files’: No such file or directory
make: *** [Makefile:42: docker-build] Error 127

But commenting the SHELL line fixes everything.

You might wanna add that to the warning you wrote about the macOS Big Sur.

geerlingguy commented 3 years ago

Thanks; looks like this bug (https://github.com/operator-framework/operator-sdk/issues/4403) extends to WSL 2 environments too, then.

SayidHosseini commented 3 years ago

I forgot to tell what distribution I tested that with. I tried with WSL2 Ubuntu 20.04.1 LTS and I got the error. I also tried with a Linode Ubuntu 20.04 LTS and it went OK.

I could try it with one or two more distributions to make sure it is a WSL2 problem and not bounded to a single distribution.

SayidHosseini commented 3 years ago

Man that took a long time! So I tested it on WSL2 Debian 10 and WSL2 Alpine Linux v3.12 and it works fine. However, WSL2 Ubuntu 18.04.5 LTS, openSUSE Leap 15.2 and WSL2 Kali 2020.4 threw error.

BTW it is important where you enter the command. The output error I posted comes from CMD in Windows Terminal. When I run it with the WSL windows, I get the following error message.

Ubuntu 18.04

env: ‘Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_2020.1804.7.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_2020.1804.7.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
docker build . -t ttl.sh/example-memcached:1h
env: ‘Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_2020.1804.7.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_2020.1804.7.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/CanonicalGroupLimited.Ubuntu18.04onWindows_2020.1804.7.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
Makefile:42: recipe for target 'docker-build' failed
make: *** [docker-build] Error 127

Ubuntu 20.04:

env: ‘Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.812.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.812.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
docker build . -t ttl.sh/example-memcached:1h
env: ‘Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.812.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.812.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.812.0_x64__79rhkp1fndgsc:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
make: *** [Makefile:42: docker-build] Error 127

Kali 2020.4:

env: ‘Files/WindowsApps/KaliLinux.54290C8133FEE_1.6.0.0_x64__ey8k8hqnwqnmg:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/KaliLinux.54290C8133FEE_1.6.0.0_x64__ey8k8hqnwqnmg:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
docker build . -t ttl.sh/example-memcached:1h
env: ‘Files/WindowsApps/KaliLinux.54290C8133FEE_1.6.0.0_x64__ey8k8hqnwqnmg:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/KaliLinux.54290C8133FEE_1.6.0.0_x64__ey8k8hqnwqnmg:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/KaliLinux.54290C8133FEE_1.6.0.0_x64__ey8k8hqnwqnmg:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
make: *** [Makefile:42: docker-build] Error 127

openSUSE Leap 15.2:

env: ‘Files/WindowsApps/46932SUSE.openSUSELeap15.2_15.2.139.0_x64__022rs5jcyhyac:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/46932SUSE.openSUSELeap15.2_15.2.139.0_x64__022rs5jcyhyac:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
docker build . -t ttl.sh/example-memcached:1h
env: ‘Files/WindowsApps/46932SUSE.openSUSELeap15.2_15.2.139.0_x64__022rs5jcyhyac:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/46932SUSE.openSUSELeap15.2_15.2.139.0_x64__022rs5jcyhyac:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
env: ‘Files/WindowsApps/46932SUSE.openSUSELeap15.2_15.2.139.0_x64__022rs5jcyhyac:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Python39/Scripts/:/mnt/c/Python39/:/mnt/c/Program’: No such file or directory
make: *** [Makefile:42: docker-build] Error 127
lexarflash8g commented 3 years ago

Thanks commenting the shell command also fixed this issue for me.. had to guess it was something with WSL2 it gave me an error not finding Putty which is strange

stale[bot] commented 3 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

geerlingguy commented 3 years ago

Not stale.

stale[bot] commented 3 years ago

This issue is no longer marked for closure.

stale[bot] commented 3 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 3 years ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.