Fail to set ulimit inside docker container

I have committed a ubuntu image with a new user call “user”
and then i create the container with the following command

 sudo docker run -u=user -ti test1 /bin/bash

I check that there are only two process running

  • Docker Share Volume and edit files
  • Docker Golang onbuild custom action at docker run
  • Shipping multi-container Docker app
  • Docker fails to install php mysql extension
  • Standalone kubelet persistent disk mount on Google Cloud instance
  • Passing a docker's image generated name to another container in docker-composer
  • user@1bc12c468f29:/$ ps
      PID TTY          TIME CMD
       1 ?        00:00:00 bash
       12 ?        00:00:00 ps
    

    But after i set

    ulimit -u 10
    

    I cannot create any new process, even ls

    user@1bc12c468f29:/$ ulimit -u 10
    user@1bc12c468f29:/$ ls
    bash: fork: retry: No child processes
    bash: fork: retry: No child processes
    bash: fork: retry: No child processes
    bash: fork: retry: No child processes
    bash: fork: Resource temporarily unavailable
    

    Should ulimit -u 10 allow 10 processes running simultaneously?

  • Accessing to mysql from host to container in cli
  • npm install fails when running through a docker container
  • How do named volumes work in docker?
  • stream_socket_client timeout between containers when using PhpStorm Run
  • Docker network issue: Server misbehaving
  • ERROR: (gcloud.preview) Invalid choice: 'docker'. Did you mean 'dm-v2'?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.