AWS Multicontainer Docker Environments – don't start

i use the beanstalk-maven-pluginand like to deploy a Multicontainer to aws but i’m not able to do this. The Stack just failed with “Failed to launch environment.” – that’s it.

If i create the Environment with the same zip file via the beanstalk aws page, it works.

  • Upload saved image to docker
  • How to build an Image using Docker API?
  • Write permissions for IBM Containers Volume as non-root user
  • Using SemanticUI with Docker
  • Docker with cloudflare
  • Docker run Error: Status 403 trying to pull repository Unable to access the repository:
  • i created two service roles / iam

    1) aws-elasticbeanstalk-ec2-role – with the Policy: AWSElasticBeanstalkMulticontainerDocker, AmazonEC2ContainerServiceforEC2Role

    2) aws-elasticbeanstalk-service-role with the same Policies like aws-elasticbeanstalk-ec2-role

    My files are:

    Dockerrun.aws.json

    {
      "AWSEBDockerrunVersion": 2,
      "containerDefinitions": [
        {
          "name": "nginx-proxy",
          "image": "nginx:1.10",
          "essential": true,
          "memory": 128,
          "portMappings": [
            {
              "hostPort": 80,
              "containerPort": 8080
            }
          ]
        }
      ]
    }
    

    .ebextensions/blockdevice-sdh.config

    option_settings:
      aws:autoscaling:launchconfiguration:
        BlockDeviceMappings: /dev/xvdcz=:12:true:gp2,/dev/sdh=:24
    

    .ebextensions/serviceroles.config

    option_settings:
      - namespace: aws:autoscaling:launchconfiguration
        option_name: IamInstanceProfile
        value: aws-elasticbeanstalk-ec2-role
    
      - namespace: aws:elasticbeanstalk:environment
        option_name: ServiceRole
        value: aws-elasticbeanstalk-service-role
    

    and some data from the pom.xml

      <properties>
        <beanstalk.solutionStack>64bit Amazon Linux 2016.03 v2.1.3 running Multi-container Docker 1.11.1 (Generic)</beanstalk.solutionStack>
        <beanstalker.region>eu-central-1</beanstalker.region>
      </properties>
    

    the console log from the instance don’t show so much. i compared the cloud formation templates (one time from the mvn deploy and one time from the ElasticBeanstalk deploy via the webpage) and i don’t see any important differences.

    After checking all events, the only thing, wich one are different is that the mvn deployment not doing the ECS task

    ECS task: arn:aws:ecs:eu-central-1:980585748732:task/b1098b24-d5ac-44e8-9987-e90e98fa0983 is RUNNING.
    Starting new ECS task with awseb-Release-nebh2zbkfa:1.
    Added instance [i-dd79c060] to your environment.
    

    The documentation from Elasticbeanstalk sayed, that EB take care of creating and running this automatically. http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_ecs.html

    but my zip file looks like this:

        0  07-15-16 21:33   .ebextensions/
      118  07-15-16 21:33   .ebextensions/blockdevice-sdh.config
       98  07-15-16 21:33   .ebextensions/customoptions.config
      268  07-15-16 21:33   .ebextensions/serviceroles.config
      292  07-15-16 00:02   Dockerrun.aws.json
    

    i hope you’ve some idea, why the container not starts.

    Thanks a lot
    Marcel

  • Live migration of a jboss/wildfly container with CRIU failed
  • Can docker “instance” run totally in ram?
  • What is [loop0] process for?
  • Connecting to Docker API with curl
  • docker-compose postgres customize database details
  • Docker: Is running tests of a windows product on linux container good?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.