Amazon Elastic Container Service
开发人员指南 (API 版本 2014-11-13)
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 Amazon AWS 入门

ecs-cli images

描述

列出 Amazon ECR 注册表或存储库中的映像。

重要

Some features described may only be available with the latest version of the ECS CLI. To obtain the latest version, see 安装 Amazon ECS CLI.

语法

ecs-cli images [--registry-id registry_id] [--tagged|--untagged] [--region region] [ECR_REPOSITORY] [--help]

选项

名称 描述

--registry-id registry_id

指定具有要列出映像的 ECR 注册表。默认情况下,将列出当前 AWS 账户的映像。

必需:否

--tagged

筛选结果以仅显示标记的映像。

必需:否

--untagged

筛选结果以仅显示未标记的映像。

必需:否

--region, -r region

指定要使用的 AWS 区域。默认为使用 configure 命令配置的群集。

类型:字符串

必需:否

--ecs-profile ecs_profile

Specifies the name of the ECS profile configuration to use. Defaults to the profile configured using the configure profile command.

Type: String

Required: No

--aws-profile aws_profile

Specifies the AWS profile to use. Enables you to use the AWS credentials from an existing named profile in ~/.aws/credentials.

Type: String

Required: No

--cluster-config cluster_config_name

Specifies the name of the ECS cluster configuration to use. Defaults to the cluster configuration set as the default.

Type: String

Required: No

--help, -h

显示指定命令的帮助文本。

必需:否

示例

示例 1

此示例列出一个 ECR 注册表中的所有映像。

ecs-cli images

输出:

REPOSITORY NAME TAG IMAGE DIGEST PUSHED AT SIZE rkt latest sha256:404758ad8af94347fc8582fc8e30b6284f2b0751de29b2e755da212f80232fac 3 months ago 203 MB foobuntu latest sha256:6b079ae764a6affcb632231349d4a5e1b084bece8c46883c099863ee2aeb5cf8 4 days ago 51.7 MB ubuntu xenial sha256:6b079ae764a6affcb632231349d4a5e1b084bece8c46883c099863ee2aeb5cf8 4 days ago 51.7 MB ubuntu latest sha256:6b079ae764a6affcb632231349d4a5e1b084bece8c46883c099863ee2aeb5cf8 4 days ago 51.7 MB ubuntu <none> sha256:512e30a26d9fa3648dbccb9e78e9bab636e6022e2d80bd73c99177b21a0d3982 19 minutes ago 268 MB ubuntu trusty sha256:bd6d24e8fa3f5822146b2c94247976b87e6564195c3c180b67833e6ea699f7c2 18 minutes ago 67.2 MB ubuntu precise sha256:b38267a51fb4460699bc2bcdbb53d42fec697bb4e4f9a819df3e762cec393b2a 17 minutes ago 40.1 MB amazon-ecs-sample latest sha256:bf04071a8edecc309f4d109ae36f24a5c272a115b6f7e636f77940059024d71c 2 weeks ago 105 MB golang latest sha256:137b22efee2df470b0cd28ebfc1ae583be0baf09334a5a882096193577d983ab 4 days ago 266 MB amazonlinux latest sha256:a59d563b5139deee8cb108bfb97bf3e9021b8ccea6dec8ff49733230cb2f0eca 4 days ago 98.8 MB awsbatch/fetch_and_run latest sha256:543800007416d0ccff4f63643bb18eeff4b874ea772128efcdc231ff456a37fc 6 weeks ago 116 MB

示例 2

此示例列出一个特定 ECR 存储库中的所有映像。

ecs-cli images ubuntu

输出:

REPOSITORY NAME TAG IMAGE DIGEST PUSHED AT SIZE ubuntu xenial sha256:6b079ae764a6affcb632231349d4a5e1b084bece8c46883c099863ee2aeb5cf8 4 days ago 51.7 MB ubuntu latest sha256:6b079ae764a6affcb632231349d4a5e1b084bece8c46883c099863ee2aeb5cf8 4 days ago 51.7 MB ubuntu <none> sha256:512e30a26d9fa3648dbccb9e78e9bab636e6022e2d80bd73c99177b21a0d3982 20 minutes ago 268 MB ubuntu trusty sha256:bd6d24e8fa3f5822146b2c94247976b87e6564195c3c180b67833e6ea699f7c2 19 minutes ago 67.2 MB ubuntu precise sha256:b38267a51fb4460699bc2bcdbb53d42fec697bb4e4f9a819df3e762cec393b2a 18 minutes ago 40.1 MB

示例 3

此示例列出一个 ECR 注册表中所有未标记的映像。

ecs-cli images --untagged

输出:

REPOSITORY NAME TAG IMAGE DIGEST PUSHED AT SIZE ubuntu <none> sha256:512e30a26d9fa3648dbccb9e78e9bab636e6022e2d80bd73c99177b21a0d3982 24 minutes ago 268 MB

本页内容: