Docker推送到AWS ECR私人回购失败,格式错误的JSON

我正在尝试AWS ECR,并向我们的私人回购站推送新标签。

它是这样的:

export DOCKER_REGISTRY=0123123123123.dkr.ecr.us-east-1.amazonaws.com export TAG=0.1 docker build -t vendor/app-name . `aws ecr get-login --region us-east-1`" # generates docker login docker tag vendor/app-name $DOCKER_REGISTRY/vendor/app-name:$TAG docker push $DOCKER_REGISTRY/vendor/app-name:$TAG 

login工作,标签被创build,我看到它与docker images ,但推失败encryption。

 The push refers to a repository [0123123123123.dkr.ecr.us-east-1.amazonaws.com/vendor/app-name] (len: 2) b1a1d76b9e52: Pushing [==================================================>] 32 B/32 B Error parsing HTTP response: unexpected end of JSON input: "" 

这可能是一个错误的configuration,但我不知道如何获得更多的输出。 该命令没有debugging级别的选项,没有其他日志,我不能拦截networkingstream量,因为它似乎encryption。

跑到同一个问题。 对于我来说,确保我所推荐的IAM用户具有ecr:BatchCheckLayerAvailability权限。

我本来打算有一个“推”的政策,并没有意识到这个权限是需要推动成功。