title: How to extend an existing docker image?
body: <p>I'm using <a href="https://hub.docker.com/r/_/elasticsearch/" rel="noreferrer">the official elasticsearch Docker image</a> instead of setting up my own elastic search instance. And that works great, up to the point when I wanted to extend it. I wanted to install <a href="http://www.elasticsearch.org/overview/marvel/" rel="noreferrer">marvel</a> into that ElasticSearch instance to get more information. </p>
  
  <p>Now dockerfile/elasticsearch automatically runs ElasticSearch and setting the command to <code>/bin/bash</code> doesn't work, neither does attaching to the container or trying to access it over SSH, nor installing ssh-daemon with <code>apt-get install -y openssh-server</code>. </p>
  
  <p>In this particular case, I could just go into the container's file system and execute <code>opt/elasticsearch/bint/plugin -i elasticsearch/marvel/latest</code> and everything worked.</p>
  
  <p>But how could I install an additional service which needs to be installed with <code>apt-get</code> when I can't have a terminal inside the running container?</p>