I added something in user1 to the user1 container to limit the maximum number of user processes for user1 , but when I run bash in the container under user1 , ulimit -a does not reflect the restrictions that are defined in the file restrictions on letters ( /etc/security/limits.conf ).
How can I make this work?
I also added the session required pam_limits.so to /etc/pam.d/common-session , so no problem.
I am launching a docker container with something like sudo docker run --user=user1 --rm=true <container-name> bash
Also, sudo docker run ... --user=user1 ... cmd does not apply foam limits, but sudo docker run ... --user=root ... su user1 -c 'cmd' does
source share