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

2

8

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?

Wiliness answered 19/6, 2017 at 22:53 Comment(3)
docker version? Do you have docker for mac?(the whale in the taskbar)Shinbone
I'm using 17.05.0-ceWiliness
Click the whale and do what @Oliver answeredShinbone
U
11

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.

Unclose answered 19/6, 2017 at 22:56 Comment(1)
For mac check the other answerOptimistic
B
2

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

Brevity answered 11/9, 2022 at 1:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.