You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docker --ulimit does not support unlimited or large numbers #12515
While trying to get my containers to generate core file dumps, I ran into an issue setting the ulimit high enough. Would love an explanation, as I have no idea why upping to 1000000 doesn't seem to have an effect!
$ docker run --ulimit core=999999 -t ubuntu:12.04 bash -c "ulimit -c"
976
$ docker run --ulimit core=1000000 -t ubuntu:12.04 bash -c "ulimit -c"
0
$ docker run --ulimit core=unlimited -t ubuntu:12.04 bash -c "ulimit -c"
invalid value "core=unlimited" for flag --ulimit: strconv.ParseInt: parsing "unlimited": invalid syntax
See 'docker run --help'.
Yes, this is really weird... I wonder what commit fixed this... cc @LK4D4@crosbymichael
If there is a 1.6.1, surely the commit that fixes this needs to be in it.
Activity
cpuguy83 commentedon Apr 19, 2015
Quite strange.
I can confirm I'm seeing the same issue.
However, running the same basic code that Docker/libcontainer are running I cannot repro:
unlimitedis purposefully not support since it's not a real value, it's just a constant set to a really high number.hqhq commentedon Apr 21, 2015
I can't reproduce, the latest master code works fine for me:
mischief commentedon Apr 21, 2015
rather amusing behavior:
cpuguy83 commentedon Apr 22, 2015
Yes, this is really weird... I wonder what commit fixed this... cc @LK4D4 @crosbymichael
If there is a 1.6.1, surely the commit that fixes this needs to be in it.
josiasmontag commentedon May 10, 2015
Issue is not solved with 1.6.1.
Workaround in the meantime: Use magic
-1.cpuguy83 commentedon May 10, 2015
Yes, 1.6.1 only had security fixes.
cpuguy83 commentedon May 10, 2015
Closing since this issue is fixed on master.
nikolai-derzhak-distillery commentedon Feb 9, 2016
-1 trick does not work anymore:
docker: Error response from daemon: json: cannot unmarshal number -1 into Go value of type uint64.
jorge-trujillo commentedon Apr 24, 2016
Any update on this? docker-compose still returns this error:
nikolai-derzhak-distillery commentedon Apr 25, 2016
I use next constant as workaround:
Comment from my code:
ulimit -1 throws error as it uint64 now in docker code
so we use 2^63-1 number as equal value
cpuguy83 commentedon Apr 25, 2016
Probably an easy fix here: https://github.com/docker/go-units/blob/master/ulimit.go#L113 to support
-1as unlimited.vincentwoo commentedon Feb 14, 2017
For those on this issue, setting -1 does appear to work as of Docker 1.13.