title: Restart docker compose with a different command
body: <p>I've an application running on a server, but somehow the server rebooted but some docker services could restart, another not.</p>
  
  <p><strong>docker-compose ps:</strong></p>
  
  <pre class="lang-sh prettyprint-override"><code>    Name                   Command                 State                          Ports                     
  ------------------------------------------------------------------------------------------------------------
  elasticsearch   /usr/local/bin/docker-entr ...   Up           0.0.0.0:9200-&gt;9200/tcp, 0.0.0.0:9300-&gt;9300/tcp
  kibana          sh -c ./bin/kibana-plugin  ...   Restarting                                                 
  logstash        /usr/local/bin/docker-entr ...   Up           5044/tcp, 9600/tcp 
  </code></pre>
  
  <p>If I try to see the logs of kibana by <strong>docker kibana ps:</strong></p>
  
  <pre class="lang-sh prettyprint-override"><code>Plugin kbn_radar already exists, please remove before installing a new version
  Found previous install attempt. Deleting...
  Attempting to transfer from file:///usr/share/kibana/config/kbn_radar.zip
  Transferring 3686700 bytes....................
  Transfer complete
  Retrieving metadata from plugin archive
  Extracting plugin archive
  </code></pre>
  
  <p>The problem is: kbn_radar takes a long time to restart, so I want to restart the kibana service without needing to restart the other applications. I've tried to change my .yml file where I've run the commands to start de plugins:</p>
  
  <pre class="lang-js prettyprint-override"><code>  kibana:
      image: docker.elastic.co/kibana/kibana:6.8.0
      command: 
      - sh 
      - -c
      - './bin/kibana-plugin install file:///usr/share/kibana/config/kbn_radar.zip &amp;&amp; ./bin/kibana-plugin install file:///usr/share/kibana/config/ob-kb-funnel-6.8.zip &amp;&amp; exec /usr/local/bin/kibana-docker'
  </code></pre>
  
  <p>So at the end, my docker compose was:</p>
  
  <p><strong>docker-compose.yml:</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>version: "3"
  
  networks:
    elasticsearch-net-624:
  
  services:
    elasticsearch-products-624-service:
      image: docker.elastic.co/elasticsearch/elasticsearch:6.8.0
      container_name: elasticsearch
      restart: always
      networks:
      - elasticsearch-net-624
      ports:
      - "9200:9200"
      - "9300:9300"
      expose:
      - "9200"
      volumes:
      - /home/docker/elastic.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      - /home/docker/elastic-certificates.p12:/usr/share/elasticsearch/config/elastic-certificates.p12
      - /docker/elastic/data:/usr/share/elasticsearch/data
      - /docker/elastic/data/snapshots:/usr/share/elasticsearch/data/snapshots
  
    kibana:
      image: docker.elastic.co/kibana/kibana:6.8.0
      command: 
      - sh 
      - -c
      - 'exec /usr/local/bin/kibana-docker'
      container_name: kibana
      restart: always
      hostname: kibana
      networks:
      - elasticsearch-net-624
      environment:
      - SERVER_NAME=kibana.localhost
      - ELASTICSEARCH_URL=http://elasticsearch:9200
      - ELASTICSEARCH_HOST=elasticsearch
      - ELASTICSEARCH_PORT=9200
      - XPACK_GRAPH_ENABLED=true
      - XPACK_WATCHER_ENABLED=true
      - XPACK_ML_ENABLED=true
      - XPACK_MONITORING_ENABLED=true
      - XPACK_MONITORING_UI_CONTAINER_ELASTICSEARCH_ENABLED
      ports:
      - "5601:5601"
      expose:
      - "5601"
      links:
      - elasticsearch-products-624-service
      depends_on:
      - elasticsearch-products-624-service
      volumes:
      - /home/docker/kibana.yml:/usr/share/kibana/config/kibana.yml
      - /home/docker/ob-kb-funnel-6.8.zip:/usr/share/kibana/config/ob-kb-funnel-6.8.zip
      - /home/docker/kbn_radar.zip:/usr/share/kibana/config/kbn_radar.zip 
      - /home/morpheus/docker/dashboard_app.js:/usr/share/kibana/src/legacy/core_plugins/kibana/public/dashboard/dashboard_app.js
  
    logstash:
      image: docker.elastic.co/logstash/logstash:6.8.0
      container_name: logstash
      restart: always
      volumes:
      - /home/docker/logstash.yml:/usr/share/logstash/config/logstash.yml
  </code></pre>
  
  <p>Finally I've tried to restart the service:</p>
  
  <pre class="lang-sh prettyprint-override"><code>docker-compose -f docker-kibana.yml restart kibana
  </code></pre>
  
  <p>But, the service keeps trying to restart the plugins and if I run docker-compose ps, the command continues "sh -c ./bin/kibana-plugin  ..."</p>
  
  <p>How could I restart docker service with another command? Or restart my service without restarting the plugin that already exists?</p>