0

I have an ECS Cluster that is using an image hosted in AWS ECR. The dockerfile is executing a script in it's entrypoint attribute. My cluster is able to spin up instances but then goes into a stopped state. The only error it is giving me is as follows:

Exit Code   0
Entry point ["/tmp/init.sh"]

The only information given to me is the reason the container stopped:

Stopped reason Essential container in task exited

Any advice on how I can fix this would be helpful.

I tried running the container locally using the following: docker run -it application /bin/sh

For some reason running the container, I am unable to get to in using /bin/sh.

Any advice would be appreciated.

Dave Michaels
  • 847
  • 1
  • 19
  • 51

1 Answers1

0

What does the init.sh script do? That message isn't bad necessarily. It may just mean that your script has completed and no background process has started so your container is exiting.

You could run the container locally gaining a shell (as you did) and launch the script manually from there or you could just run the container without /bin/sh and let the script execute to see what happens. If the script exits locally as well then that seems to be the proper behavior and anything you'd need to debug you can debug locally.

mreferre
  • 5,464
  • 3
  • 22
  • 29