[当我将Dockerrun.aws.json上传到Elastic Beanstalk时,在EB中出现以下错误。
关于事件:
- During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.
- Failed to deploy application.
- Unsuccessful command execution on instance id(s) 'i-XXXXXXXXXXXXXXX'. Aborting the operation.
关于健康:
Overall:
- Command failed on all instances.
- Incorrect application version found on all instances. Expected version "Sample Application" (deployment 1).
i-XXXXXXXXXXXX:
- Application deployment failed at 2020-06-13T11:21:07Z with exit status 1 and error: Engine execution has encountered an error.
- Incorrect application version "43" (deployment 5). Expected version "Sample Application" (deployment 1).
关于日志:
Error response from daemon: You cannot remove a running container XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. Stop the container before attempting removal or force remove
Error response from daemon: conflict: unable to delete XXXXXXXXXXXX (cannot be forced) - image is being used by running container XXXXXXXXXXXX
我的Dockerrun.aws.json文件:
{
"AWSEBDockerrunVersion": "1",
"Authentication": {
"Bucket": "try-new-new",
"Key": ".docker/config.json"
},
"Image": {
"Name": "registry.gitlab.com/XXXXXXXXX/XXXXXXXXXX",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "80"
}
]
}
我的.docker / config.json文件:
{
"auths" :
{
"https://registry.gitlab.com/" :
{
"auth" : "XXXXXXXXXXXXXXXXX",
"email" : "[email protected]"
}
}
}
我注意到该问题是身份验证问题。不幸的是,我无法授权AWS从Registry.gitlab.com提取容器。
目前(尽管不是完整的解决方案),我已经通过将容器移动到AWS Elastic Container Repository创建了一个解决方案。