Docker Community Forums

Share and learn in the Docker community.

How to stop service from exiting after the CMD completes?

docker

(Vetional) #1

I am trying to run Spark-2.0.0 on docker swarm, but my spark master container is shutting down, after completion of /sbin/start-master.sh

I am using docker 1.12.1, after initializing and adding a few worker nodes to the swarm when I try to start the spa master using:

docker service create –name spark-master gettyimages/spark /usr/spark-2.0.0/sbin/start-master.sh

The container keeps exiting after the start-master.sh completes. How can I keep the container running in a graceful manner?


(Vetional) #2

Well I got the answer here is the link for the discussion.