title: Why can't I use Docker CMD multiple times to run multiple services?
body: <p>I have built a base image from Dockerfile named centos+ssh. In centos+ssh's Dockerfile, I use CMD to run ssh service.</p>
  
  <p>Then I want to build a image run other service named rabbitmq,the Dockerfile:</p>
  
  <pre><code>FROM centos+ssh
  EXPOSE 22
  EXPOSE 4149
  CMD /opt/mq/sbin/rabbitmq-server start
  </code></pre>
  
  <p>To start rabbitmq container，run：</p>
  
  <pre><code>docker run -d -p 222:22 -p 4149:4149 rabbitmq
  </code></pre>
  
  <p>but ssh service doesn't work, it sense rabbitmq's Dockerfile CMD override centos's CMD.</p>
  
  <ol>
  <li>How does CMD work inside docker image?</li>
  <li>If I want to run multiple service, how to? Using supervisor?</li>
  </ol>