title: How to allocate 50% CPU resource to docker container via `docker run`?
body: <p>I have a 4-core CPU, I want to allocate 50% CPU resource to a docker container.<br>
  After reading the <a href="http://docs.docker.com/reference/run/"><code>docker-run</code></a> manual and <a href="https://github.com/docker/docker/blob/9eb8fcd58a5dc0a6fd812fc2bdc410f36dd63cc0/runconfig/config.go"><code>config.go</code></a> source code.<br>
  I still don't know how to use the <code>-c, --cpu-shares=0</code> option.</p>
  
  <pre><code>docker run -c 0.5 -i -t ubuntu /bin/bash
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>docker run -c 2 -i -t ubuntu /bin/bash
  </code></pre>