fiza khan
fiza khan

Reputation: 1296

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.

Upvotes: 3

Views: 5483

Answers (1)

ahoang18
ahoang18

Reputation: 143

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

Upvotes: 5

Related Questions