Док-станция ElticBeanstalk Multicontainer: redis: CannotStartContainerError Ошибка создания среды выполнения OCI - PullRequest
0 голосов
/ 01 октября 2019

Я борюсь с запуском конфигурации нескольких докеров с Elasticbeanstalk, где у меня есть следующий файл конфигурации

Dockerrun.aws.json

    {
  "AWSEBDockerrunVersion": 2,
  "containerDefinitions": [
    {
      "environment": [
        {
          "name": "NODE_ENV",
          "value": "production"
        },
        {
          "name": "PORT",
          "value": "3000"
        }
      ],
      "essential": true,
      "image": "node:10",
      "links": [
        "redis"
      ],
      "memory": 4,
      "mountPoints": [
        {
          "containerPath": "/var/www/app/current",
          "sourceVolume": "VarWwwAppCurrent"
        }
      ],
      "name": "app",
      "portMappings": [
        {
          "containerPort": 3000,
          "hostPort": 3000
        }
      ]
    },
    {
      "essential": true,
      "image": "redis:3.0",
      "memory": 4,
      "name": "redis",
      "mountPoints": [
        {
          "containerPath": "/data",
          "sourceVolume": "_Redis"
        }
      ],
      "portMappings": [
        {
          "containerPort": 6379,
          "hostPort": 6379
        }
      ]
    },
    {
      "essential": true,
      "image": "ubuntu:18.04",
      "links": [
        "app"
      ],
      "memory": 4,
      "mountPoints": [
        {
          "containerPath": "/var/www",
          "sourceVolume": "VarWww"
        }
      ],
      "name": "web",
      "portMappings": [
        {
          "containerPort": 8080,
          "hostPort": 8080
        },
        {
          "containerPort": 443,
          "hostPort": 443
        }
      ]
    }
  ],
  "family": "",
  "volumes": [
    {
      "host": {
        "sourcePath": "/var/www"
      },
      "name": "VarWww"
    },
    {
      "host": {
        "sourcePath": "/var/www/app/current"
      },
      "name": "VarWwwAppCurrent"
    },
    {
      "host": {
        "sourcePath": "redis"
      },
      "name": "_Redis"
    }
  ]
}

docker-compose.yml

version: '2'
services:
  web:
    build:
      context: ./
      dockerfile: web.dockerfile
    container_name: web
    ports:
      - 8080:8080
      - 443:443
    volumes:
      - ./:/var/www
    links:
      - app
  app:
    build:
      context: ./
      dockerfile: app.dockerfile
    volumes:
      - ./:/var/www/app/current
    ports:
      - 3000:3000
    environment:
      - NODE_ENV=production
      - PORT=3000
    links:
      - redis
  redis:
    image: redis:3.0
    ports:
      - "6379:6379"
    volumes:
      - ./redis:/data

Я получаю следующую трассировку стека ошибок

2019-10-01 05:12:57    INFO    Environment update is starting.      
2019-10-01 05:13:20    INFO    Deploying new version to instance(s).
2019-10-01 05:13:51    ERROR   Failed to start ECS task: arn:aws:ecs:ap-south-1:798147022816:task/95e95054-b562-4595-b26f-fb75cc394bba is STOPPED.
2019-10-01 05:13:51    ERROR   ECS task stopped due to: Task failed to start. (app: 
redis: CannotStartContainerError: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"process_linux.go:367: setting cgroup config for procHooks process ca
web: )
2019-10-01 05:13:55    ERROR   Failed to start ECS task after retrying 2 times.
2019-10-01 05:13:56    ERROR   [Instance: i-0af2024164bff864a] Command failed on instance. Return code: 1 Output: .
2019-10-01 05:13:56    INFO    Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2019-10-01 05:13:57    ERROR   Unsuccessful command execution on instance id(s) 'i-0af2024164bff864a'. Aborting the operation.
2019-10-01 05:13:57    ERROR   Failed to deploy application.  
...