title: Docker Container not working in AWS ECS using AWS ECR
body: <p>I've single docker container and have to deploy on AWS Cloud using AWS ECR with Elastic Beanstalk. I'm using <code>Dockerrun.aws.json</code> file to provide the information about repository details. I have pushed my image to my docker hub and Elastic Container Registry.</p>
  <p>Using DockerHub in ECS, It can pull the docker image from docker hub and starts the container without any issues and working the app as expected. On the other hand, the container gets stopped when the image pulled from AWS ECR Repository for the same application. The deployment gets failed for the reason: <code>Essential container in task exited</code></p>
  <p><code>Dockerrun.aws.json</code></p>
  <pre class="lang-js prettyprint-override"><code>{
      
      &quot;containerDefinitions&quot;: [
          {
              &quot;essential&quot;: true,
              &quot;image&quot;: &quot;01234567891.dkr.ecr.us-east-1.amazonaws.com/app:1&quot;,
              &quot;memory&quot;: 512,
              &quot;name&quot;: &quot;web&quot;,
              &quot;portMappings&quot;: [
                  {
                      &quot;containerPort&quot;: 5000,
                      &quot;hostPort&quot;: 80
                  }
              ]
          }
      ],
      &quot;family&quot;: &quot;&quot;,
      &quot;volumes&quot;: [],
      &quot;AWSEBDockerrunVersion&quot;: &quot;2&quot;
  }
  </code></pre>
  <p>I logged into the instance and tried to get the logs of the containers.
  But, I got this error <code>standard_init_linux.go:211: exec user process caused &quot;exec format error&quot;</code></p>
  <p><code>Dockerfile</code></p>
  <pre><code>FROM python:3.4-alpine
  ADD . /code
  WORKDIR /code
  RUN pip install -r requirements.txt
  CMD [&quot;python&quot;, &quot;app.py&quot;]
  </code></pre>