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:

  • TravisCI build succeeds even when tests fail
  • how to automate docker development environment startup for a multi-service web app (on Linux)
  • How to sort by name `docker service ls`
  • How to substitute a command output into a string and append that to a file (in Alpine Linux running in Docker)
  • When to use -type d-exec chmod 750 / 640 in docker
  • How can I force cancel dockerbuild using bash a command?
  • $ 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.

  • Install pylint in Alpine Linux based Docker Image
  • Where to store Dockerized python application configuration
  • Difference between VOLUME declaration in Dockerfile and -v as docker run parameter
  • curl can get web content hosted in local docker but browser cannot open the page
  • Mysql: forward host lookup failed: Unknown host
  • Backup stateful docker volume
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.