|
@@ -156,7 +156,7 @@ func StartContainer(containerName string, containerType string) (structs.Contain
|
|
|
imageExistsLocally := false
|
|
imageExistsLocally := false
|
|
|
for _, img := range images {
|
|
for _, img := range images {
|
|
|
for _, tag := range img.RepoTags {
|
|
for _, tag := range img.RepoTags {
|
|
|
- if tag == containerType+":"+desiredTag && img.ID == desiredHash {
|
|
|
|
|
|
|
+ if tag == desiredRepo+":"+desiredTag && img.ID == desiredHash {
|
|
|
imageExistsLocally = true
|
|
imageExistsLocally = true
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
@@ -176,7 +176,7 @@ func StartContainer(containerName string, containerType string) (structs.Contain
|
|
|
case existingContainer == nil:
|
|
case existingContainer == nil:
|
|
|
// if the container does not exist, create and start it
|
|
// if the container does not exist, create and start it
|
|
|
_, err := cli.ContainerCreate(ctx, &container.Config{
|
|
_, err := cli.ContainerCreate(ctx, &container.Config{
|
|
|
- Image: containerType + ":" + desiredTag,
|
|
|
|
|
|
|
+ Image: desiredRepo + ":" + desiredTag,
|
|
|
}, nil, nil, nil, containerName)
|
|
}, nil, nil, nil, containerName)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return containerState, err
|
|
return containerState, err
|