我想部署一個使用Docker構建的Rails應用程序到Elastic Beanstalk的多容器服務。我Dockerrun.aws.json目前的樣子:Dockerrun.aws.json文件私人dockerhub圖像
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "myapp",
"host": {
"sourcePath": "/var/app/current"
}
},
{
"name": "myapp-redis",
"host": {
"sourcePath": "/var/app/current/myapp-redis"
}
},
{
"name": "myapp-postgres",
"host": {
"sourcePath": "/var/app/current/myapp-postgres"
}
}
],
"authentication": {
"bucket": "myapp",
"key": "config.json"
},
"containerDefinitions": [
{
"name": "redis",
"image": "redis:3.0.5",
"environment": [
{
"name": "Container",
"value": "redis"
}
],
"portMappings": [
{
"hostPort": 6379,
"containerPort": 6379
}
],
"essential": true,
"memory": 128,
"mountPoints": [
{
"sourceVolume": "myapp-redis",
"containerPath": "/var/lib/redis/data",
"readOnly": false
}
]
},
{
"name": "postgres",
"image": "postgres:9.4.5",
"environment": [
{
"name": "Container",
"value": "postgres"
}
],
"portMappings": [
{
"hostPort": 5432,
"containerPort": 5432
}
],
"essential": true,
"memory": 128,
"mountPoints": [
{
"sourceVolume": "myapp-postgres",
"containerPath": "/var/lib/postgresql/data",
"readOnly": false
}
]
},
{
"name": "myapp",
"image": "myrepo/myapp:latest",
"environment": [
{
"name": "Container",
"value": "myapp"
}
],
"essential": true,
"memory": 128,
"mountPoints": [
{
"sourceVolume": "myapp",
"containerPath": "/myapp",
"readOnly": false
}
]
}
]
}
我config.json
文件是在鬥myapp/config.json
和的格式如下:
{
"https://index.docker.io/v1/": {
"auth": "mylongauthtokenhere",
"email": "[email protected]"
}
}
這樣的設置,當我點到公共回購爲"image": "myrepo/myapp:latest",
線工程,但是當我嘗試使用此配置初始化時,出現錯誤:err="Error: image myrepo/myapp:latest not found"
和ERROR [Instance: i-913b2004] Command failed on instance. Return code: 1 Output: 'Failed to start ECS task after retrying 2 times.'
我也嘗試了幾種不同的方式配置config.json,但沒有運氣。任何幫助,將不勝感激!
只需要清楚,當你使用這個配置指向一個公共回購它的作品,但如果你指出它一個私人回購你得到的錯誤(其他一切都是相同的) ? – Ray
是的,據我所知,唯一可以掛斷的是這是一個私人回購。 – Raskolnikov
你可以把auth的完整內容,我想看看它的嵌套有多遠? 1.7 Docker或1.6及更早版本的配置是? – Ray