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?

  • How to programmatically specify the IP and port of a dependent docker container created by Marathon?
  • Facing FileNotFoundException while accessing JSON File in classpath using java in docker containers(SprintBootApplication)
  • Image successfully builds but won't push due to auth credentials
  • start apache in start container in windows docker-compose system
  • Uncaught exception 'RedisException' with message 'Connection closed'
  • use docker container on host network without sharing host's ip
  • What are the differences between Kubernetes Pods and Docker Compose(s) (Composures?)
  • How to communicate between Docker containers via “hostname”
  • Docker build ends with error “the command … returned a non-zero code: 100”
  • How to mount external volume for mongoDB using docker-compose and docker-machine
  • MYSQLI Connection refused when connecting to another docker container running MariaDB
  • Docker MariaDB/Mysql dump
  • 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.