We have a docker images being stored in ECR, some have come from a TC build agent and some have come from builds on local developer machines. All images can be pulled an run locally but when trying to start the images built on the build TC build agents we get the following error when the ECS cluster starts running the task.
InternalError: failed to normalize image reference "http://xxx.eu-west-1.amazonaws.com/events/name-of-contianer:tag"
I can't seem to find any additional info in the logs, or mention of an error for normalize in any of the ECS docs. Has anyone experienced this error, or even know what it means!
ECS Task Definition:
{
"ipcMode": null,
"executionRoleArn": "arn:aws:iam::xxxxxxxxxxxx:role/ecsTaskExecutionRole",
"containerDefinitions": [
{
"dnsSearchDomains": null,
"environmentFiles": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [
{
"hostPort": 80,
"protocol": "tcp",
"containerPort": 80
}
],
"command": null,
"linuxParameters": null,
"cpu": 0,
"environment": [
{
"name": "ServiceConfiguration__BasePath",
"value": "/mobile-read-model"
},
{
"name": "ServiceConfiguration__Version",
"value": "0.1.0"
}
],
"resourceRequirements": null,
"ulimits": null,
"dnsServers": null,
"mountPoints": [],
"workingDirectory": null,
"secrets": null,
"dockerSecurityOptions": null,
"memory": null,
"memoryReservation": null,
"volumesFrom": [],
"stopTimeout": null,
"image": "http://xxxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/events/mobile-app-read-model:0.1.0-blank-read-model0011",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
"disableNetworking": null,
"interactive": null,
"healthCheck": {
"retries": 1,
"command": [
"CMD-SHELL",
"curl -f http://localhost/health || exit 1"
],
"timeout": 5,
"interval": 30,
"startPeriod": 60
},
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": false,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "mobile-read-model"
}
],
"placementConstraints": [],
"memory": "512",
"taskRoleArn": "arn:aws:iam::xxxxxxxxxxxx:role/ecsTaskExecutionRole",
"compatibilities": [
"EC2",
"FARGATE"
],
"taskDefinitionArn": "arn:aws:ecs:eu-west-1:xxxxxxxxxxxx:task-definition/mobile-app-readmodel:55",
"family": "mobile-app-readmodel",
"requiresAttributes": [
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.task-iam-role"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "ecs.capability.container-health-check"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "ecs.capability.task-eni"
},
{
"targetId": null,
"targetType": null,
"value": null,
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.29"
}
],
"pidMode": null,
"requiresCompatibilities": [
"FARGATE"
],
"networkMode": "awsvpc",
"cpu": "256",
"revision": 55,
"status": "ACTIVE",
"inferenceAccelerators": null,
"proxyConfiguration": null,
"volumes": []
}
The image
attribute should be: "image": "xxxxxxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com/events/mobile-app-read-model:0.1.0-blank-read-model0011",
without the http://
.
You need to remove http://
from the image name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With