Giter Site home page Giter Site logo

Comments (2)

 avatar commented on June 29, 2024

After some more testings, the nproc ulimit is only applied for users different to the main/start process (entrypoint/cmd) of a container.

When running a container with a specific user no max user processes limit is applied.

$ docker run --rm -it -u operator centos:7 bash -c 'ulimit -u'
unlimited

When running a container and somehow switching the user or running several commands in different users the limit is applied.

$ docker run --rm -it centos:7 su -l operator -s /bin/bash -c 'ulimit -u'
4096

Without the 20-nproc.conf file and switching the user or running several commands in different users no limit is applied.

$ docker run --rm -it centos:7 bash -c \
  "rm /etc/security/limits.d/20-nproc.conf && su -l operator -s /bin/bash -c 'ulimit -u'"
unlimited

Is the default nproc limit of CentOS still useful for containers?

from sig-cloud-instance-build.

barelnir avatar barelnir commented on June 29, 2024

I have the same issue, ssh is refused and only if I change the number I am able to connect,
Is it OK to remove this file? or it is required?

from sig-cloud-instance-build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.