title: What does AWS ECS exception Container.image contains invalid char means?
body: <p>We use CircleCi in our workflow in order to deploy PHP site as docker image on ElasticBeanstalk server. 
  The <code>build</code> jobs in CircleCi is defined as follows:</p>
  
  <pre><code>deploy:
      docker:
        - image: docker:17.05.0-ce-git
      steps:
        - checkout
        - setup_remote_docker
        - run:
            name: Install dependencies
            command: |
              apk add --no-cache \
                py-pip=9.0.0-r1
              pip install \
                awscli \
                awsebcli --upgrade
        - run:
            name: Login to AWS
            command: |
              login="$(aws ecr get-login --no-include-email --region us-west-2)"
              ${login}
        - run:
            name: Deploy to Elastic Beanstalk
            command: |
              echo "Commit sha: ${CIRCLE_SHA1}"
              if [ "${CIRCLE_BRANCH}" == "docker" ]; then
                sed -i'' -e "s/%BUILD_NUM%/${CIRCLE_SHA1}/g" Dockerrun.aws.json
                eb deploy sales-web -l $CIRCLE_SHA1
              fi
  </code></pre>
  
  <p>In Dockerrun.aws.json under <code>containerDefinitions</code> we have (#### are correct values for application id and repository name in ECS)</p>
  
  <pre><code>{
              "essential": true,
              "image": "####.dkr.ecr.us-west-2.amazonaws.com/####:%BUILD_NUM%",
              "memory": 2048,
              "name": "web-container",
              "portMappings": [
                  {
                      "containerPort": 80,
                      "hostPort": 80
                  }
              ]
          }
  </code></pre>
  
  <p>The <strong>Login to AWS</strong> step is successful and image is uploaded, the environment <code>sales-web</code> starts to update but fails </p>
  
  <pre><code>2018-03-02 16:10:41 UTC+0200    ERROR   Failed to deploy application.
  2018-03-02 16:10:41 UTC+0200    ERROR   Service:AmazonECS, Code:ClientException, Message:Container.image contains invalid characters., Class:com.amazonaws.services.ecs.model.ClientException
  2018-03-02 16:09:52 UTC+0200    INFO    Environment update is starting.
  </code></pre>
  
  <p>We have made sure that image is built correctly ( we can upload it ti CircleCi server, start the container and run phpunit tests). There is .elasticbeanstalk folder in root directory of project with valid <code>config.yml</code> file.</p>
  
  <p>Have tried and googled for 2 days with no luck.
  Will appreciate any help or guidence to understand what this error message means. If any additional details are neccessary I will provide them, just ask.</p>