diff --git a/ecs/pkg/amazon/backend/cloudformation_test.go b/ecs/pkg/amazon/backend/cloudformation_test.go index 2fcd15420..518c7c77a 100644 --- a/ecs/pkg/amazon/backend/cloudformation_test.go +++ b/ecs/pkg/amazon/backend/cloudformation_test.go @@ -128,7 +128,7 @@ services: `) def := template.Resources["TestTaskDefinition"].(*ecs.TaskDefinition) container := def.ContainerDefinitions[0] - assert.Equal(t, container.Image, "docker.io/library/image") + assert.Equal(t, container.Image, "image") assert.Equal(t, container.Command[0], "command") assert.Equal(t, container.EntryPoint[0], "entrypoint") assert.Equal(t, get(container.Environment, "FOO"), "BAR") diff --git a/ecs/pkg/amazon/backend/convert.go b/ecs/pkg/amazon/backend/convert.go index 196ff9ac6..ee5aa95b1 100644 --- a/ecs/pkg/amazon/backend/convert.go +++ b/ecs/pkg/amazon/backend/convert.go @@ -52,7 +52,7 @@ func Convert(project *types.Project, service types.ServiceConfig) (*ecs.TaskDefi FirelensConfiguration: nil, HealthCheck: toHealthCheck(service.HealthCheck), Hostname: service.Hostname, - Image: getImage(service.Image), + Image: service.Image, Interactive: false, Links: nil, LinuxParameters: toLinuxParameters(service), @@ -308,17 +308,6 @@ func toKeyValuePair(environment types.MappingWithEquals) []ecs.TaskDefinition_Ke return pairs } -func getImage(image string) string { - switch f := strings.Split(image, "/"); len(f) { - case 1: - return "docker.io/library/" + image - case 2: - return "docker.io/" + image - default: - return image - } -} - func getRepoCredentials(service types.ServiceConfig) *ecs.TaskDefinition_RepositoryCredentials { // extract registry and namespace string from image name for key, value := range service.Extensions { diff --git a/ecs/pkg/amazon/backend/testdata/simple/simple-cloudformation-conversion.golden b/ecs/pkg/amazon/backend/testdata/simple/simple-cloudformation-conversion.golden index b9fd6a045..0256a5868 100644 --- a/ecs/pkg/amazon/backend/testdata/simple/simple-cloudformation-conversion.golden +++ b/ecs/pkg/amazon/backend/testdata/simple/simple-cloudformation-conversion.golden @@ -174,7 +174,7 @@ } ], "Essential": true, - "Image": "docker.io/library/nginx", + "Image": "nginx", "LinuxParameters": {}, "LogConfiguration": { "LogDriver": "awslogs", diff --git a/ecs/pkg/amazon/backend/testdata/simple/simple-cloudformation-with-overrides-conversion.golden b/ecs/pkg/amazon/backend/testdata/simple/simple-cloudformation-with-overrides-conversion.golden index 0f93cbd54..b2d1ffad8 100644 --- a/ecs/pkg/amazon/backend/testdata/simple/simple-cloudformation-with-overrides-conversion.golden +++ b/ecs/pkg/amazon/backend/testdata/simple/simple-cloudformation-with-overrides-conversion.golden @@ -174,7 +174,7 @@ } ], "Essential": true, - "Image": "docker.io/library/haproxy", + "Image": "haproxy", "LinuxParameters": {}, "LogConfiguration": { "LogDriver": "awslogs",