Docker로 빌드 된 레일 애플리케이션을 Elastic Beanstalk의 다중 컨테이너 서비스에 배포하려고합니다.개인 도커 허치 이미지 용 Dockerrun.aws.json 파일
{
"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
에 있고 같은 포맷 : 나는 "image": "myrepo/myapp:latest",
라인에 대한 대중의 repo 가리킬 때
{
"https://index.docker.io/v1/": {
"auth": "mylongauthtokenhere",
"email": "[email protected]"
}
}
이 설치 작품처럼 내 Dockerrun.aws.json 현재 보이는 하지만이 구성으로 초기화하려고하면 오류가 발생합니다. 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을 구성 해 보았습니다. 이 문제에 대한 도움이 있으면 대단히 감사하겠습니다!
공용 repo를 가리키는이 구성을 사용하면 작동하지만, 개인 repo를 지정하면 오류가 발생합니다 (다른 모든 것은 동일합니다) ? – Ray
그래, 나는 그것을 걸고있는 유일한 것을 말할 수있는 한 개인 프라이팬이라는 사실이다. – Raskolnikov
인증의 전체 내용을 넣을 수 있습니까? 얼마나 중첩되는지 확인하고 싶습니까? 1.7 docker 또는 1.6 & 이전 버전의 구성입니까? – Ray