I run a container in the background using
docker run -d --name hadoop h_Service
it exits quickly. But if I run in the foreground, it works
I added read shell statement at the end. This keeps the main process of the container - startup shell script - running.
read