ECS Showing Error After Running Task Definition “STOPPED (Essential container in task exited)”

i Created one default cluster using “ami-562cf236” in Oregon Region, and i created one task Definition and service but when i’m running this service its throwing error and Stopped : “STOPPED (Essential container in task exited)” i’m pulling image from ECS repository only.
We Are Using Simple Dockerfile, we able to push image form EC2 instance to ECS Repository.
We also make this repository public, now we created Task Definition and Service, and trying to run that, but it is showing same error “STOPPED (Essential container in task exited)”. We are able to pull from ECS Repository but not able to Deploy on On Cluster.

  • How one should use jenkinsci/jnlp-slave for complex builds?
  • Dockerfile in a Amazon EB
  • Why doesn't my pod respond to requests on the exposed port?
  • MongoDB Docker Container on AWS ECS using EFS
  • Running Docker Image with AWS ECS
  • docker boto3 AWS was not able to validate the provided access credentials
  • Cluster node can't rejoin the cluster in docker swarm after its restart
  • Multiple docker containers, IP addresses, VM, OSX
  • what do the docker default iptables mean afer docker maiden installed on Ubuntu 14.04?
  • Reduce memory consumption in rake assets:precompile
  • Docker | How can I remove all containers but a certain few
  • How to copy docker images from one host to another?
  • One Solution collect form web for “ECS Showing Error After Running Task Definition “STOPPED (Essential container in task exited)””

    Based on the dockerfile i’m actually encountering the expected behavior from the task. Since the only thing happening in the dockerfile is an update, once that update is completed, the container will exit. If i like to keep the container up and running, i need to issue a command to run a program after the update is complete using ‘CMD’.

    In the example below, I am running the ‘nc’ command to set up a basic listener server on the container and the container does not exit.

    CMD sudo nc -l 80
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.