/etc/init.d/docker: 62: ulimit: error setting limit (Invalid argument) Problem

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.

4 Likes

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.

1 Like

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

1 Like