Use -1L to set max
@@ -170,10 +170,9 @@ class CreateContainerCommandImpl implements Docker.CreateContainerCommand {
.withSecurityOpts(new ArrayList<>(securityOpts))
.withBinds(volumeBinds)
.withUlimits(ulimits)
- // At docker version 1.13.1 patch 91 and earlier, pids.max for the Docker container's cgroup
- // was "max". This changed to patch 102, with a default of 4k which is too low. Note: Setting
- // this to 0L still results in 4k. File: /sys/fs/cgroup/pids/docker/CONTAINERID/pids.max.
- .withPidsLimit(409600L)
+ // Docker version 1.13.1 patch 94 changed default pids.max for the Docker container's cgroup
+ // from max to 4096. -1L reinstates "max". File: /sys/fs/cgroup/pids/docker/CONTAINERID/pids.max.
+ .withPidsLimit(-1L)
.withCapAdd(addCapabilities.toArray(new Capability[0]))
.withCapDrop(dropCapabilities.toArray(new Capability[0]))
.withPrivileged(privileged);
