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 permanently set an environmental variable in an existing docker container?
  • Docker rm does not remove my container if the physical machine dies
  • Store `docker run` command output in BASH variable
  • Cannot run script added to existing docker container
  • Automate process during docker push
  • What are advantages of writing script file in Docker?
  • $ 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.

  • Tag not found in repository
  • Bluemix Docker Container cf ic login the local Docker daemon is not reachable to authenticate
  • Does Docker contain the Heardbleed exploit?
  • How to retrieve the newest tag for an image?
  • Bamboo: More than one agent per EC2 elastic instance?
  • How to squash Dockerfiles?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.