What is the difference between the
cpu_count settings in Docker Compose v2.2 and which should I use to allocate a number of cores to my container?
I have gathered that
cpu_count is analogous to the docker run flag
--cpu-count which is for Windows use only, but I can’t find a description of the difference, and the
--cpu_count flag is not consistently present in documentation. It is mentioned here:
but not here:
and it is not mentioned in this guide:
I have reviewed this PR:
but it made me more confused because the unit test for
cpu_count isn’t skipped like the
cpu_percent test when the platform is Windows, even though both options are documented as being “Windows only” in the commandline reference.
Which is supported on which platform(s)? Are they mutually exclusive? Is the documentation inconsistent or am I just reading it incorrectly?