Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup ulimit parameter in dockerfile

I am trying to create a docker file. Can anyone please tell me that how to add the ulimit parameter in docker file. I tried like this:

RUN --ulimit nofile=262144:262144

But it is showing error. Can anyone please tell me how to correctly set this parameter in Dockerfile.

like image 407
fiza khan Avatar asked Jun 27 '26 02:06

fiza khan


1 Answers

You can't set ulimits on docker containers in the dockerfile - needs to be set when running the container from the command line. Try this:

docker run --ulimit nofile=262144:262144 IMAGE
like image 124
ahoang18 Avatar answered Jun 28 '26 17:06

ahoang18



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!