When Dind is installed with the sh file obtained from https://get.docker.com, an error message as follows is received when starting docker:
/etc/init.d/docker:62: ulimit: limit setting error (Invalid argument)
This is because line 62 of the /etc/init.d/docker file says ulimit -Hn 524288.
This line should be saved by deleting the -H argument and changing it to ulimit -n 524288. After this docker can now be run.
Container where the error was received: Debian GNU/Linux 11 (bullseye)
This error started to be received approximately as of Friday, January 19, 21:00:00UTC 2024.
Can confirm the workaround by @royalamrah works. I do not have the issue if I install docker-ce: 24.0.7-1. the -H param is not in the init script.
Yes, there was no problem in the old version.
Exact same issue I observed while trying to launch docker inside WSLv2 (with no installation of Docker for Windows at Host OS) via VS Code integrated terminal. However, launching command /etc/init.d/docker start at ordinary Windows Terminal worked with no issues. There might be some elevated privileges invoked by VS code terminal itself, since it worked just fine a couple of days ago for me there, but recently I’ve updated something probably.
Suggested adjustment worked just fine since ulimit -n 524288 changes “soft limits”, thanks for the tip
Thank you Royal Amrahov, this worked for me on Ubuntu 20.04.6 LTS in Windows 11 WSL2. I had to change ownership of the file in order to save the change:
sudo chown -R $USER /etc/init.d/docker
(in case it saves someone a search)
I used proot-distro in Samsung S9, running Ubuntu 24.04 and run as service docker start
and your work around not work.
Thanks so much. That works.