mirror of https://github.com/docker/compose.git
Don't prepent docker.io to image URI. Let the container runtime apply default registry
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
6664447d29
commit
ec58975524
|
@ -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")
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
}
|
||||
],
|
||||
"Essential": true,
|
||||
"Image": "docker.io/library/nginx",
|
||||
"Image": "nginx",
|
||||
"LinuxParameters": {},
|
||||
"LogConfiguration": {
|
||||
"LogDriver": "awslogs",
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
}
|
||||
],
|
||||
"Essential": true,
|
||||
"Image": "docker.io/library/haproxy",
|
||||
"Image": "haproxy",
|
||||
"LinuxParameters": {},
|
||||
"LogConfiguration": {
|
||||
"LogDriver": "awslogs",
|
||||
|
|
Loading…
Reference in New Issue