【问题标题】:amazon aws ecr tag image without existing tag没有现有标签的亚马逊 aws ecr 标签图像
【发布时间】:2018-04-09 17:04:01
【问题描述】:

我正在尝试在 aws ecr 中标记旧图像。

虽然亚马逊为具有现有标签的retag 图像提供帮助。如何仅使用 imageDigest 标记图像。例如,如何将下面的最后一张图片标记为 "imageDigest": "sha256:9f61b77c31..​​.""dev"

aws ecr list-images --repository-name my_aws_ecr_repo
{
    "imageIds": [
        {
            "imageDigest": "sha256:c115230398..."
        },
        {
            "imageDigest": "sha256:236ce1ed44...",
            "imageTag": "latest"
        },
        {
            "imageDigest": "sha256:c1dd997eb7..."
        },
        {
            "imageDigest": "sha256:9f61b77c31..."
        }
    ]
}

【问题讨论】:

    标签: amazon-web-services docker-registry


    【解决方案1】:

    aws ecr batch-get-image 可以选择使用 imageDigest 而不是 imageTag 作为图像 ID:--image-ids imageDigest=

    例如:

    MANIFEST=$(aws ecr batch-get-image --repository-name amazonlinux --image-ids imageDigest="sha256:xxx" --query "images[].imageManifest" --output text)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-24
      • 1970-01-01
      • 2017-09-10
      • 1970-01-01
      • 2018-08-13
      • 2016-01-13
      • 2019-12-16
      • 1970-01-01
      相关资源
      最近更新 更多