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

ecs-cli push

描述

将映像推送到 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 push [--registry-id registry_id] [--region region] ECR_REPOSITORY[:TAG] [--help]

选项

名称 描述

--registry-id registry_id

指定要将映像推送到的 ECR 注册表 ID。默认情况下,映像将推送到当前 AWS 账户。

必需:否

--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

此示例将名为 ubuntu 的本地映像推送到具有相同名称的 ECR 存储库。

ecs-cli push ubuntu

输出:

INFO[0000] Getting AWS account ID... INFO[0000] Tagging image repository="aws_account_id.dkr.ecr.us-east-1.amazonaws.com/ubuntu" source-image=ubuntu tag= INFO[0000] Image tagged INFO[0001] Creating repository repository=ubuntu INFO[0001] Repository created INFO[0001] Pushing image repository="aws_account_id.dkr.ecr.us-east-1.amazonaws.com/ubuntu" tag= INFO[0079] Image pushed

本页内容: