title: Docker multiple entrypoints
body: <p>Say I have the following Dockerfile:</p>
  
  <pre><code>FROM ubuntu
  
  RUN apt-get update
  RUN apt-get install -y apache2
  RUN apt-get install -y mongod #pretend this exists
  
  EXPOSE 80
  
  ENTRYPOINT ["/usr/sbin/apache2"]
  </code></pre>
  
  <p>The <code>ENTRYPOINT</code> command makes it so that <code>apache2</code> starts when the container starts. I want to also be able to start <code>mongod</code> when the the container starts with the command <code>service mongod start</code>. According to the <a href="http://docs.docker.io/en/latest/use/builder/#entrypoint">documentation</a> however, there must be only one <code>ENTRYPOINT</code> in a Dockerfile. What would be the correct way to do this then?</p>