Docker Community Forums

Share and learn in the Docker community.

Possible to affect a fixed number of cpu core to a container?


(Thomasj) #1

Hi!

I’d like to know if it is possible to affect a fixed number of cpu core to a container.
As some software editors sell their licenses regarding the number of cpu cores used, I’d like to know if it is possible to do so.

Thnak you very much for your help!


(Sam Saffron) #2

I don’t think there is an cpu affinity setting for docker run, but it sounds like an interesting feature if it could be pulled off.


(Andy Rothfusz) #3

I have not used it, but there is a parameter for --opts which lets you configure the CPU set:


(Thomasj) #4

Great thank you!
Good thing for customers who have cpu constraincts with their editors licenses