The flag -cfor the command docker runchanges the weighting of the container CPU share relative to the weighting of all other running containers.
It does not restrict the use of the CPU container from the host machine.
You can use the flag --cpu-quotato limit CPU usage, for example:
$ docker run -ti  --cpu-quota=50000 ubuntu:latest /bin/bash
--cpu-quotacommonly used with --cpu-period. For more information on the Docker launch control document, see More details:
https://docs.docker.com/reference/run/#runtime-constraints-on-resources