Since Docker announced a new subscription for Docker Desktop for personal use, educational institutions, non-commercial open-source projects and s...
For further actions, you may consider blocking this person and/or reporting abuse
Would you be interested in how to do same without so much trickery?
Ip stuff port forwarding etc. I mean?
My simple repo can have you up and running. I will write an article eventually, but it is there.
Hi Pawel, thank you for your feedback. I tried to made some simplifications from the initial article from Jonathan Bowman. I had in mind to make my existing toolchains still working (VSCode, Visual Studio).
I'm very interested if you have a simpler way to proceed :)
I run this stack using this. Start of the month i will write full article, for now this will have to do.
Essentially i run docker, vs code , gpu compute (inside containers too) all on ubuntu wsl2. With proper networking, which is the biggest blunder from M$ to date in regard to wsl..
github.com/pawelgnatowski/WSL2-Net...
Exactly my thoughts, there's too much complexity here + there's more comprehensive guide on how to install docker in Linux on official docker website which takes half of this article.
For me launching
dockerd
failed since chain of commands withifconfig
returned some extra garbage.I was able to fix it with adding
| head -n 1
at the end, so final command would look like:You need to escape the dot (.) in the regexp as such:
"([0-9]{1,3}[.]){3}[0-9]{1,3}"
Then it will work as expected.
I followed all the steps but unable to run docker on my WSL2 -
Any help in debuggin -
sudo dockerd -H
ifconfig eth0 | grep -E "([0-9]{1,3}.){3}[0-9]{1,3}" | grep -v 127.
0.0.1 |awk '{ print $2 }' | cut -f2 -d:
[sudo] password for jai:
INFO[2021-11-06T15:39:08.506977000+05:30] Starting up
WARN[2021-11-06T15:39:08.509171500+05:30] Binding to IP address without --tlsverify is insecure and gives root access on this machine to everyone who has access to your network. host="tcp://169.254.255.121:2375"
WARN[2021-11-06T15:39:08.509628200+05:30] Binding to an IP address, even on localhost, can also give access to scripts run in a browser. Be safe out there! host="tcp://169.254.255.121:2375"
WARN[2021-11-06T15:39:10.291048100+05:30] Binding to an IP address without --tlsverify is deprecated. Startup is intentionally being slowed down to show this message host="tcp://169.254.255.121:2375"
WARN[2021-11-06T15:39:10.292307700+05:30] Please consider generating tls certificates with client validation to prevent exposing unauthenticated root access to your network host="tcp://169.254.255.121:2375"
WARN[2021-11-06T15:39:10.292918800+05:30] You can override this by explicitly specifying '--tls=false' or '--tlsverify=false' host="tcp://169.254.255.121:2375"
WARN[2021-11-06T15:39:10.294801200+05:30] Support for listening on TCP without authentication or explicit intent to run without authentication will be removed in the next release host="tcp://169.254.255.121:2375"
failed to load listeners: listen tcp 169.254.255.121:2375: bind: cannot assign requested address
jai@FA057586:~$ wsl
WSL
Wsman Shell commandLine, version 0.2.1
I had the same error, it seems it's because you are using WSL version 1. Just run wsl --set-default-version 2, and re install your linux distribution.
Thanks for the article, I was able to successfully implement most of it.
I am stuck here trying to start dockerd from the Windows PowerShell (in admin mode):
PS C:\Users\clutat> wsl sh -c "sudo dockerd -H tcp://$ip"
sudo: dockerd: command not found
Any ideas what's incorrect here?
Thanks Nicolas. Have you managed to mount volumes from windows to docker image running in WSL2 ? Looks like windows folder has to be mounted first to WLS2 and then from WSL2 to the docker image ....
It's easy, by default (at least for me) wsl has mounted all drives in /mnt// for example /mnt/c/ for C: Drive and /mnt/d/ for D: drive
From there you can simply use these paths as youve mentioned
yes, you are right... but.
Previously with Docker Desktop we could run docker with
-v %cd%/someFolder:/whatever
or-v ./someFolder:/whatever
, now we have to provide full path , like-v /mnt/c/full/local/path/to/someFolder:/whatever
, which is user specific and will not run on team mate's computer... Any thoughts how to overcome this ?When windows folders are mounted and you launch a terminal to your WSL2 distro, you can navigate on your windows folders with commands like : wsl cd MyWindowsDirectory... wsl ls etc... without to be connected to a bash, just direcly from windows :)
When Dockerd is simply launched in your distro, you can run also "wsl docker ps" etc...
so.. my morning started out heading towards this rabbit-hole, but then fortunately I checked with our HR department, and discovered that my employer doesn't exceed the requirements for a commercial Docker Desktop license. big relief for me right there..
while this post does contain lots of super technical points (yeah, I saw those comments), this is a super technical topic.. which leads straight back to the "how" and "why" of Docker's decision on this matter.
anyways, with the deadline for this looming ever closer, I suspect there are going to be a sudden stupendous influx of "Docker alternative" and "Docker without Docker Desktop" articles, debates, and so on.. not unlike this one.
so before that gets out of control: I'd like to share one that I did discover just this morning: devopstales.github.io/home/docker-...
it has lots of helpful information presented in a clear way, and the alternatives it lists don't require any "special magic" to get working, which might be very appealing for some.
with all that said: I do sincerely hope that anyone able and/or required to pay for a license actually does so... it would be really sad for Docker to have come this far, having influenced so many aspects of "containerization", only to fade into the background because of "suddenly not being free to everybody". at the end of the day, everybody still has bills to pay.. 🤔
I got this error when I tried to run "sudo dockerd -H ifconfig eth0 | grep -E "([0-9]{1,3}.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d:" And I can't see my eth0 configs in ifconfig command
error:failed to load listeners: listen tcp 169.254.218.38:2375: bind: cannot assign requested address
Thanks for the help.
Hi guys,
I am receiving error at launch docker with
sudo dockerd -H ifconfig eth0 | grep -E "([0-9]{1,3}.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d:
The error is:
failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid
I tried deleting pid file but i dont have permission for it i tried using
sudo systemctl stop docker
and then running it but error is still the same.Can anyone help me with it please ?
Thank you
`
sudo dockerd -H
ifconfig eth0 | grep -E "([0-9]{1,3}.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d:
above command in "Launch dockerd" section shows this error : "dockerd" accepts no argument(s)
Hello, there is a small error in regex provided to get the host's IP address; if the output of
ifconfig eth0
returns this:it will match the line starting with "TX packets too".
Here is the corrected version:
ifconfig eth0 | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d:
Have you heard of portainer? It's a Web based docker ui.
I don't have a complex use case for it but I think it works.
There is some socket magic that I don't know by memory because I just keep the command in a gist.
I'll share later in a response to this comment
Hi Muttsuri, Yes I use Portainer to manage containers and stacks on server.
My concern was to continue to debug from Visual Studio 2019 and Visual Code directly in container.
Hello,
I am trying to follow the above steps on Alpine and i am not able to figure out the equivalent for launching dockerd to get the ip address.
Below one works fine in ubantu
sudo dockerd -H
ifconfig eth0 | grep -E "([0-9]{1,3}.){3}[0-9]{1,3}" | grep -v 127.0.0.1 |awk '{ print $2 }' | cut -f2 -d:
Any idea/Help?
Best Regards,
Praveen
Hello,
Does anybody has a equivalent command for Alpine?
Praveen
I would like to share an updated and easier version to do this at this time.
Podman does everything for you and has a nice and clean GUI.
podman-desktop.io/downloads/windows
For anyone else who struggles with the instructions of this post and with environment setup in general, I hope this post finds you.
Hello, thank you for this article. I've been reading both this and "Install Docker on Windows (WSL) without Docker Desktop". At the moment I am stuck at step Launch dockerd and I get this error (image below).
ibb.co/yQGVZ18
I set that host path in that previous tutorial in the daemon.json file. I am a bit confused on how to solve this because Im very new to this, so I would appreciate any help. Thanks!
You have to remove the daemon.json if you want to use args command line.
Hi, you can use the variable DOCKER_HOST to specify the way you want to connect to docked : unix://, tcp://, ssh://
Looks too much tricky for me. I would prefer a prettier straight-foreward solution.
I really liked how your turned windows into a linux by adding a c:\bin dir :)
Rancher Desktop seems to simplify things a lot for Windows users:
Great man, thks a lot... you save my day!!!