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:

  • How to connect Docker containers in series?
  • Eval in docker-machine: terminal vs shell script
  • Pass Docker ENV variable to rails app
  • Cannot start service app: oci runtime error - executable file not found in $PATH
  • Limit memory on a docker container doesn't work
  • docker exec is not working in cron
  • $ 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.

  • Docker maven build fails to download JARs
  • how to access a webapp deploy folder for deployed war, docker
  • SonarQube in Docker failes to resolve local host
  • Build Docker image for ARM architecture on Intel machine (Mac)
  • Can you share Docker containers?
  • In docker-compose how to create an alias / link to localhost?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.