我有一個自定義的docker鏡像上傳到ECS。我打開了權限來嘗試解決這個問題(一旦我能夠完成這個工作,我將再次鎖定它)。我試圖將docker映像部署到彈性beanstalk。我有一個docker啓用彈性beanstalk環境設置。根據AWS文檔,如果我從AWS內部拉取我的映像,我不需要傳入證書。所以我上傳我的Dockerrun.aws.json文件並嘗試安裝它。它失敗,錯誤如下:AWS Docker部署
Command failed on instance. Return code: 1 Output: Failed to authenticate with ECR for registry '434875166128' in 'us-east-1'. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03build.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
/var/log/eb-activity.log信息沒有用處。
這是我的Dockerrun.aws.json文件:
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "{id000xxxx}.dkr.ecr.us-east-1.amazonaws.com/my-repo:1.0.0",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "4000"
}
],
"Logging": "/var/log/app-name"
}
我也試圖與S3的dockercfg.json文件中添加認證。它也不適合我。
Note that I am using a business account instead of a personal account, so there may be some unknown variances as well.
謝謝!
更新:我的用戶此刻也擁有完整的權限,所以不應該有任何權限明智的阻礙。
檢查ECR存儲庫設置/權限像這裏:https://media.amazonwebservices.com/blog/2015/ecr_permissions_1.png –
也請確保IAM角色附加到豆莖(運行拉的實例)可以通過IAM權限訪問ECR和ECS:http://docs.aws.amazon.com/AmazonECR/latest/userguide/ECR_IAM_policies.html –
Thanks @MarcYoung。我確實已經設置了這些 –