Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 卷名太短elasticbeanstalk错误_Amazon Web Services_Docker_Amazon Elastic Beanstalk - Fatal编程技术网

Amazon web services 卷名太短elasticbeanstalk错误

Amazon web services 卷名太短elasticbeanstalk错误,amazon-web-services,docker,amazon-elastic-beanstalk,Amazon Web Services,Docker,Amazon Elastic Beanstalk,我正在尝试将停靠的应用程序部署到elastic beanstalk。上传包含dockrun.aws.json文件的zip文件后,控制台返回 2018-05-09T20:08:15Z }' 2018-05-09T20:08:15Z + local 'CONTAINER_STOPPED_REASONS=web: CannotCreateContainerError: API error (400): create .: volume name is too short, names should b

我正在尝试将停靠的应用程序部署到elastic beanstalk。上传包含
dockrun.aws.json
文件的zip文件后,控制台返回

2018-05-09T20:08:15Z }'
2018-05-09T20:08:15Z + local 'CONTAINER_STOPPED_REASONS=web: CannotCreateContainerError: API error (400): create .: volume name is too short, names should be at least two alphanumeric characters
2018-05-09T20:08:15Z 
2018-05-09T20:08:15Z db: '
2018-05-09T20:08:15Z + '[' -n 'Essential container in task exited' ']'
2018-05-09T20:08:15Z + error 'ECS task stopped due to: Essential container in task exited. (web: CannotCreateContainerError: API error (400): create .: volume name is too short, names should be at least two alphanumeric characters
2018-05-09T20:08:15Z 
2018-05-09T20:08:15Z db: )'
2018-05-09T20:08:15Z + echo 'ECS task stopped due to: Essential container in task exited. (web: CannotCreateContainerError: API error (400): create .: volume name is too short, names should be at least two alphanumeric characters
2018-05-09T20:08:15Z 
2018-05-09T20:08:15Z db: )'
2018-05-09T20:08:15Z ECS task stopped due to: Essential container in task exited. (web: CannotCreateContainerError: API error (400): create .: volume name is too short, names should be at least two alphanumeric characters
2018-05-09T20:08:15Z 
2018-05-09T20:08:15Z db: )
2018-05-09T20:08:15Z + eventHelper.py --msg 'ECS task stopped due to: Essential container in task exited. (web: CannotCreateContainerError: API error (400): create .: volume name is too short, names should be at least two alphanumeric characters
2018-05-09T20:08:15Z 
2018-05-09T20:08:15Z db: )' --severity ERROR
我查看了我的
dockrun.aws.json
文件,但没有小于2个字符的卷名,我将文件中的所有
字符更新为
this
code
,我看到一些帖子说windows可能存在路径解决问题,但我不确定如何解决它

我提供了我的
docker compose.yml
dockrun.aws.json
文件供参考

docker-compose.yml:

version: '3'

services:
  db:
    image: postgres:10.1
    environment:
      - POSTGRES_USER=name
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=db1
    ports:

      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data/
  web:
    image: rdeng/test:latest
    build: this
    environment:
      - RDS_DB_NAME=db1
      - RDS_USERNAME=name
      - RDS_HOSTNAME=db
      - RDS_PASSWORD=password
      - RDS_PORT=5432
    command: bash -c "python /code/manage.py makemigrations && python /code/manage.py migrate && python /code/manage.py runserver 0.0.0.0:8000"
    volumes:
      - this:/code
    ports:
      - "8000:8000"
    depends_on:
      - db

volumes:
  postgres_data:
dockrun.aws.json:

{
    "AWSEBDockerrunVersion": 2,
    "containerDefinitions": [
        {
            "environment": [
                {
                    "name": "POSTGRES_USER",
                    "value": "name"
                },
                {
                    "name": "POSTGRES_PASSWORD",
                    "value": "password"
                },
                {
                    "name": "POSTGRES_DB",
                    "value": "db1"
                }
            ],
            "essential": true,
            "image": "postgres:10.1",
            "mountPoints": [
                {
                    "containerPath": "/var/lib/postgresql/data/",
                    "sourceVolume": "Postgres_Data"
                }
            ],
            "name": "db",
            "memory":64,
            "portMappings": [
                {
                    "containerPort": 5432,
                    "hostPort": 5432
                }
            ]
        },
        {
            "command": [
                "bash",
                "-c",
                "python /code/manage.py makemigrations && python /code/manage.py migrate && python /code/manage.py runserver 0.0.0.0:8000"
            ],
            "environment": [
                {
                    "name": "RDS_DB_NAME",
                    "value": "db1"
                },
                {
                    "name": "RDS_USERNAME",
                    "value": "name"
                },
                {
                    "name": "RDS_HOSTNAME",
                    "value": "db"
                },
                {
                    "name": "RDS_PASSWORD",
                    "value": "password"
                },
                {
                    "name": "RDS_PORT",
                    "value": "5432"
                }
            ],
            "essential": true,
            "memory":64,
            "image": "dockerhubstuff/test:latest",
            "mountPoints": [
                {
                    "containerPath": "/code",
                    "sourceVolume": "code"
                }
            ],
            "name": "web",
            "portMappings": [
                {
                    "containerPort": 8000,
                    "hostPort": 8000
                }
            ]
        }
    ],
    "family": "",
    "volumes": [
        {
            "host": {
                "sourcePath": "postgres_data"
            },
            "name": "Postgres_Data"
        },
        {
            "host": {
                "sourcePath": "."
            },
            "name": "code"
        }
    ]
}
我还在我的目录中添加了一个
.env
文件,其中包含包含此行的
docker compose.yml
文件

COMPOSE\u CONVERT\u WINDOWS\u path=1

但同样的错误仍然存在