I tried to install this image...
# docker run -d -p 5601:5601 -p 5000:5000 -p 9200:9200 --ulimit 65536 kenwdelong/elk-docker:latest
and got this error:
invalid argument "65536" for --ulimit: invalid ulimit argument: 65536
See 'docker run --help'.
If I remove ulimit option, then I get the following error in the container log.
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
As per google, docker-compose.yml file can have ulimit clause like this...
version: '2'
services:
elastic:
image: elasticsearch
environment:
- ES_JAVA_OPTS=-Xmx2g -Xms2g
ulimits:
nofile:
soft: 65536
hard: 65536
I do not want to use docker-compose, but need that functionality in run command.
Use the form: docker run --ulimit <type>=<soft>:<hard>
So, for your nofile, an example would be --ulimit nofile=65536:65536
Docs:
https://docs.docker.com/engine/reference/commandline/run/#set-ulimits-in-container-ulimit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With