dockerfiles icon indicating copy to clipboard operation
dockerfiles copied to clipboard

[cupsd] incompatibilities across docker versions due to ulimit changes

Open mtraum-oe opened this issue 1 year ago • 1 comments

This image goes into a restart loop on Docker version 27.3.1, build ce12230. It works fine on another box with Docker version 25.0.3, build 4debf41.

cupsdDoSelect() failed - Bad address! errors in error_log pointed me to this SO.

Output from the olbat/cupsd:stable-2024-11-15 on Docker version 25.0.3, build 4debf41

root@0c5a8f6e9cc0:/# ulimit -n
32768

On Docker version Docker version 27.3.1, build ce12230:

root@4b904e3f7a30:/# ulimit -n
1073741816

I've replaced the CMD with this and it appears to work around the issue: CMD ["sh", "-c", "ulimit -n 65535 && /usr/sbin/cupsd -f"]

Or, it seems like #108 referred to another possible solution.

I know you can set this in the docker run command. It seems to alleviate people's issues if you put it in the Dockerfile, but maybe that is not the docker way.

By the way, thanks for you efforts with this project - solid work!

mtraum-oe avatar Dec 03 '24 02:12 mtraum-oe

Thanks a lot for your consideration and your investigation 🙏

FYI, the default ulimit used by your docker daemon can can be configured in your docker daemon's configuration.

It's also possible to to overwrite this value at runtime with a dedicated option of the docker run command.

It should be enough to fix the issue without having to taint the base image to fit the default configuration of the Docker daemon in your OS.

I'm also going to add a note in the README file about it 👍

olbat avatar Dec 09 '24 20:12 olbat

No updates, closing the issue.

olbat avatar Sep 14 '25 10:09 olbat