Is there a way to disallow other docker containers using the same CPU?

So it’s easy to tell Docker which CPU a container can use:

docker run --cpuset=7 some_container_name

But this command can be run multiple times and all these processes share the same core. Is there a way to give a container exclusive access to a CPU and error out if anyone else tries to use it?

  • Couchbase XDCR in a Docker container
  • Docker: Unable to correct problems, you have held broken packages
  • docker containers need to be secure by default?
  • How To Create And Start Docker Container with specific port, detached mode using docker-java
  • A Docker workflow for a developers team
  • Run apache/php/nginx in background Docker container
  • How to mount a Host folder in minikube VM
  • Deleting docker files after uninstall
  • Why Docker build do not have -f parameter?
  • docker + django : loop + break using forms
  • Does capitrano conflict with docker?
  • RabbitMQ, docker, single queue, multiple consumers
  • One Solution collect form web for “Is there a way to disallow other docker containers using the same CPU?”

    No, this isn’t a feature of Docker. It would need to be done at a layer above Docker (like Kubernetes or ECS). But it would also be fairly easy to implement this yourself.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.