Docker inherits the Linux CGroups notion of CPU shares (by default it is 1024 shared weight units).
A relative weight can be expressed - run the container on 4 CPUs on 50% shared weight units:
docker run -it --rm -c 512 nginx --cpus 4
docker run -it --rm --cpuset-cpus=0,2 busybox --cpus 2 dd if=/dev/zero of=/dev/null