• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

104
Views
Docker Compose shared CPUs

In Docker Compose is there a way to create containers with their own CPU? I don't want them to share CPUs I´ve allocated to them.

Suppose I give to Docker access to 3 CPUs: I want each of my three containers to have its own CPU.

Is it possible?

Thanks

about 2 months ago ·

Santiago Trujillo

1 answers
Answer question

0

Limit the specific CPUs or cores a container can use. A comma-separated list or hyphen-separated range of CPUs a container can use, if you have more than one CPU. The first CPU is numbered 0. A valid value might be 0-3 (to use the first, second, third, and fourth CPU) or 1,3 (to use the second and fourth CPU).

docker run --cpuset-cpus="0" [...]

In docker-compose:

services:
  service:
    cpuset: "0"
about 2 months ago · Santiago Trujillo Report
Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.