How to stop service from exiting after the CMD completes?

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

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/

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

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