user1664213
user1664213

Reputation: 93

Docker not able to use all of Macbook's CPU cores

I am currently using a Macbook Pro with i7, which has 8 cores. However, I am not able set the CPU cores to more than 1. When I run

docker run --cpus=2 "my-image"

I get the following error:

docker: Error response from daemon: Range of CPUs is from 0.01 to 1.00, as there are only 1 CPUs available.

What am I missing?

Upvotes: 8

Views: 6150

Answers (2)

RogerS
RogerS

Reputation: 1441

If you use Docker Desktop for Mac, you increase from the UI: enter image description here

Upvotes: 2

Oliver
Oliver

Reputation: 12981

You need to increase the maximum number of CPUs available to containers in the Docker Server. In OS X you can find them in Preferences -> Advanced.

Upvotes: 11

Related Questions