Fix adding a tag to a container group

This commit is contained in:
Djordje Lukic 2020-07-16 10:01:49 +02:00
parent 45a7c7a422
commit a2edb5b64e
1 changed files with 4 additions and 4 deletions

View File

@ -196,16 +196,16 @@ func (cs *aciContainerService) Run(ctx context.Context, r containers.ContainerCo
if err != nil {
return err
}
addTag(groupDefinition, singleContainerTag)
addTag(&groupDefinition, singleContainerTag)
return createACIContainers(ctx, cs.ctx, groupDefinition)
}
func addTag(groupDefinition containerinstance.ContainerGroup, tagName string) {
func addTag(groupDefinition *containerinstance.ContainerGroup, tagName string) {
if groupDefinition.Tags == nil {
groupDefinition.Tags = make(map[string]*string, 1)
}
groupDefinition.Tags[tagName] = to.StringPtr("")
groupDefinition.Tags[tagName] = to.StringPtr(tagName)
}
func (cs *aciContainerService) Stop(ctx context.Context, containerName string, timeout *uint32) error {
@ -332,7 +332,7 @@ func (cs *aciComposeService) Up(ctx context.Context, opts cli.ProjectOptions) er
}
logrus.Debugf("Up on project with name %q\n", project.Name)
groupDefinition, err := convert.ToContainerGroup(cs.ctx, *project)
addTag(groupDefinition, composeContainerTag)
addTag(&groupDefinition, composeContainerTag)
if err != nil {
return err