Closed divideby0 closed 8 years ago
+1
To clarify, mem_limit
and cpu_shares
are supported but it doesn't appear that ulimit
is supported yet. Ulimit options were only recently added in the Docker 1.6 engine:
Sorry, I misread. Yes, ulimit
support would be good. Looks like docker-py added support in https://github.com/docker/docker-py/pull/554, so it should be simple to do.
+1 need for couchbase/server image
Also worth noting that docker recently added support for ulimit to docker build
as well. I wonder if compose should apply the limits both for build and run?
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
Working on this now. The ulimits argument in docker-py takes a list of dictionaries, with the key "name", optional keys "soft" and "hard", e.g. {'name': 'nofile', 'soft': 8096, 'hard': 16192}
The expected YAML entry in a Docker compose file for this would be:
ulimits:
nofile:
soft: 8096
hard: 16192
Correct?
That sounds good to me, though I'm not certain if the existing YAML parser supports deeply nested values. If no, I think the alternative would also be acceptable:
ulimits:
nofile: "8096:16912"
Note that the latter syntax more closely matches what's actually provided to the Docker daemon, for example:
docker -d --default-ulimit nofile=8096:16912
So that might be the path of least resistance.
@KevinGreene that sounds good to me
Thanks for picking this up! Let me know if I can be of any help
Working locally - Should have a PR ready tonight after some documentation fixes
Now that Docker 1.6 supports ulimit options, it would be nice to have this as an option for containers managed by compose, similar to
mem_limit
,cpu_shares
, etc.