Variable cgroups parametres in Docker

I have a problem with setting cgroups in cooperation with Docker. I have my own runnable Docker image

docker run exp

But the thing that I want is that every user who wants to run my image have to set cgroups parametres before script in image will be run.
I know that there exists something like this:

  • Passing parameter in docker build command with fish
  • How to start docker container after succesfull wait-for-it script
  • Unable to run shell script using dockerfile
  • Unable to start Mysql in a Dockerfile when executing CMD script
  • Unable to install docker
  • Scripting Docker, Not Connected After Running Script?
  • $ docker run -it -m 300M exp
    

    but this is not what I’m looking for.
    What I really want is something like that. If user types

    docker run exp
    

    then this shows up:
    enter cgroups parametres
    and after that image starts up.
    I really want to force user to enter his own requirements for cgroups.

    And I really dont know how to do this. I thought about some bash script which creates new group in cgroups in every user pc who wants run my docker image but I’m still not sure if it is even possible.

    I’ll be glad for any help.
    Thanks.

  • SSH server does not accept connections
  • docker copy file from one container to another?
  • Links not being created between containers
  • limit logs amount for docker-compose
  • How to set the locale inside a Docker container?
  • Bypass install configuration in dockerfile
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.