Fix adding a tag to a container group
@@ -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
