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 do I proxy every request from a dotnet core app running in a docker container
  • Deploying docker swarm without using docker machine
  • Asp.net 5 - Docker
  • Docker --env-file - executable file not found in $PATH
  • Can't get Docker image after windows installation
  • Unable to execute shell script with parameter from Dockerfile
  • How to use Makefile in docker-machine
  • How to automatically remove container data from the host when rm the container?
  • Headless Chrome in Docker using Xvfb
  • Let two Containers getting linked to eachother
  • How to bootstrap a docker container?
  • Tomcat + MySQL docker container outputting utf8 text with wrong encoding
  • 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.