task wont stay running on Amazon EC2

I followed this tutorial:

I created a simple helloworld 5 web application. I then created a Docker image and pushed it to Docker Hub:

  • Proxying http requests to another docker container
  • c#/Mono solution not building on remote Dokku server
  • docker: 'network' is not a docker command
  • How to write files from Docker image to EFS?
  • Unable to load AWS credentials from any provider in the chain in Docker EC2 env
  • Can I use Docker simply to set up the general environment of an EC2 instance?
  • I then created an Amazon EC2 cluster using my Docker image and the task won’t stay running.

    If I look at the task it says the stopped reason is : Essential container in task exited.

    I am very new to EC2 and Docker so any help would be appreciated.

  • 'aws configure' in docker container will not use environment variables or config files
  • Run a hadoop cluster on docker containers
  • Isolate PHP versions on AWS EC2
  • Can't mount HOST folder into Amazon Docker Container?
  • Docker on Amazon Cloud
  • Empty project with docker supper in Visual Studio
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.