我是AWS的新手。我想在AWS ECS容器实例上设置私有Docker存储库。我创建了一个名为的存储库name
。AWS显示的示例推入命令正在运行。
aws ecr get-login --region us-west-2
docker build -t name .
docker tag name:latest ############.dkr.ecr.us-west-2.amazonaws.com/name:latest
docker push ############.dkr.ecr.us-west-2.amazonaws.com/name:latest
但是,通过此命令,我构建并推送了一个名为的映像name
,我想构建一个名为的映像foo
。所以我将命令更改为:
docker build -t foo .
docker tag foo ###########.dkr.ecr.us-west-2.amazonaws.com/name/foo
docker push ###########.dkr.ecr.us-west-2.amazonaws.com/name/foo
这应该可以,但是不能。经过一段时间的重试后,我得到了错误:
The push refers to a repository [###########.dkr.ecr.us-west-2.amazonaws.com/name/foo]
8cc63cf4528f: Retrying in 1 second
...
name unknown: The repository with name 'name/foo' does not exist in the registry with id '############'
AWS真的需要我要推送的每个映像专用的存储库吗?