In docker run, how to set multi-value in –ulimit

$ sudo docker run ulimit fsize=10240 cpu=12 -it ubuntu /bin/bash
docker: Error parsing reference: “cpu=12” is not a valid repository/tag.
See ‘docker run –help’.

$ sudo docker run –ulimit fsize=10240 –ulimit cpu=12 -it ubuntu /bin/bash
root@ea4b00375adf:/# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) 10
pending signals (-i) 5903
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 524288
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) 12
max user processes (-u) 524288
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

  • How to push/build a docker image in release process via sbt-release
  • I have working with dockerfile to build and image and it build and run successfully but tomcat is not up
  • (psycopg2.OperationalError) could not connect to server: Connection refused Is the server
  • Docker, Supervisord and logging - how to consolidate logs in docker logs?
  • Change CPU capacity of Docker containers
  • Nginx, WordPress, and SQL
  • I want to set multi-value in –ulimit,

    seems –ulimit fsize=10240 –ulimit cpu=12 works well,

    but –ulimit fsize=10240 cpu=12 doesn’t work,

    is there any format I can use with only one –ulimit?

  • Intellisense for python dependencies installed in docker containers?
  • docker container throws error: php_network_getaddresses: getaddrinfo failed: Name or service not known
  • using system mongodb for multiple docker containers?
  • Is there any way to get logs in Docker Swarm?
  • how can i launch the kafka scheduler using marathon in minimesos?
  • Create mongodb container w default data
  • One Solution collect form web for “In docker run, how to set multi-value in –ulimit”

    Note that the ulimit tool shows blocks and not bytes.

    Try:

    sudo docker run --ulimit fsize=2048 --ulimit cpu=12 -it ubuntu /bin/bash 
    

    ulimit -a

    file size               (blocks, -f) 2
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.