Actually, I have tried the above answer, but it did not seem to work.
To get my containers to acknowledge the ulimit
change, I had to update the docker.conf
file before starting them:
$ sudo service docker stop
$ sudo bash -c "echo \"limit nofile 262144 262144\" >> /etc/init/docker.conf"
$ sudo service docker start