“sh” script is not getting executed when docker containers starts with Entrypoint

“sh” script is not getting executed when docker containers starts with Entrypoint

However, when we peek inside container ,we are able to execute the same “sh” file by attaching to a container id and executing the startup command from inside the container. The container is seen up only till i exit from the container. Once i exit from the container, the container is killed. I’m not able to bring up a container with terracotta service running inside the container by using the Dockerfile and with the ENTRYPOINT in the Dockerfile

Please find the attached snapshot for your reference. Also, the contents of docker-entrypoint.sh file is as shown below. Please let me know if you need more information regarding the same.

#!/bin/bash -x
/home/pg/partygaming/bin/tc_exclusivelogin_1.sh start force  &

error message

Source: Docker Questions