Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting nofiles ulimt via an env variable #265

Closed
gcbirzan opened this issue Jun 13, 2018 · 2 comments
Closed

Allow setting nofiles ulimt via an env variable #265

gcbirzan opened this issue Jun 13, 2018 · 2 comments
Labels
Request Request for image modification or feature

Comments

@gcbirzan
Copy link

This would allow helm/charts#5873 to be fixed. A similar fix was implemented for the bitnami image for helm/charts#3855.

@gcbirzan gcbirzan changed the title Allow setting ulimt -n via an env variable Allow setting nofiles ulimt via an env variable Jun 13, 2018
@wglambert wglambert added the Request Request for image modification or feature label Jun 13, 2018
@yosifkit
Copy link
Member

This is already available via the docker run interface, so it is not necessary via an environment variable:

$ docker run -it --rm --ulimit nofile=1024 rabbitmq bash
root@9a784c3998c3:/# ulimit -n
1024
root@9a784c3998c3:/# exit

See kubernetes/kubernetes#3595 for Kubernetes support. Since Kubernetes does not support it, you could always change the command of the container:

$ docker run -it --rm rabbitmq bash -c 'ulimit -n && ulimit -n 1024 && ulimit -n'
1048576
1024
$ # so, something like this:
$ docker run -d rabbitmq bash -c 'ulimit -n 1024 && exec docker-entrypoint.sh rabbitmq'

@pniebylski-zilch
Copy link

It is needed if you want default behaviour and not always think about adding --ulimit flag to each docker build or docker run commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

4 participants