【问题标题】:ECS CLI efsVolumeConfiguration Docker Compose / ECS Params ymlECS CLI efsVolumeConfiguration Docker Compose / ECS 参数 yml
【发布时间】:2020-07-04 06:35:46
【问题描述】:

我有一个通过ecs-cli compose service up部署在ECS上的服务

ECS/EFS 文档说要像这样配置您的任务定义,以便在 ecs 容器中挂载 efs 卷:

{
    "containerDefinitions": [
        {
            "memory": 128,
            "portMappings": [
                {
                    "hostPort": 80,
                    "containerPort": 80,
                    "protocol": "tcp"
                }
            ],
            "essential": true,
            "mountPoints": [
                {
                    "containerPath": "/usr/share/nginx/html",
                    "sourceVolume": "efs-html"
                }
            ],
            "name": "nginx",
            "image": "nginx"
        }
    ],
    "volumes": [
        {
            "name": "efs-html",
            "efsVolumeConfiguration": {
                "fileSystemId": "fs-1234",
                "rootDirectory": "/path/to/my/data"
            }
        }
    ],
    "family": "nginx-efs"
}

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_efs.html#efs-create

这如何转化为 docker-compose/ecs-params.yml 语法?

【问题讨论】:

    标签: amazon-ecs amazon-efs


    【解决方案1】:

    已在1019 解决。

    文档可以在here找到。

    【讨论】:

      【解决方案2】:

      【讨论】:

      猜你喜欢
      • 2016-05-26
      • 2019-02-15
      • 2020-08-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-17
      • 2021-08-18
      • 2017-09-30
      相关资源
      最近更新 更多