mirror of
https://github.com/docker/compose.git
synced 2025-07-21 12:44:54 +02:00
Change single container tag to docker-single-container
; added tag docker-compose-application
. The compose tag is not used yet, can be useful for metrics, and maybe other things later on.
This commit is contained in:
parent
1fbdbbbbe3
commit
23a03c59aa
@ -42,7 +42,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
singleContainerTag = "single--container--aci"
|
singleContainerTag = "docker-single-container"
|
||||||
|
composeContainerTag = "docker-compose-application"
|
||||||
composeContainerSeparator = "_"
|
composeContainerSeparator = "_"
|
||||||
statusUnknown = "Unknown"
|
statusUnknown = "Unknown"
|
||||||
)
|
)
|
||||||
@ -182,13 +183,16 @@ func (cs *aciContainerService) Run(ctx context.Context, r containers.ContainerCo
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
addTag(groupDefinition, singleContainerTag)
|
||||||
|
|
||||||
|
return createACIContainers(ctx, cs.ctx, groupDefinition)
|
||||||
|
}
|
||||||
|
|
||||||
|
func addTag(groupDefinition containerinstance.ContainerGroup, tagName string) {
|
||||||
if groupDefinition.Tags == nil {
|
if groupDefinition.Tags == nil {
|
||||||
groupDefinition.Tags = make(map[string]*string, 1)
|
groupDefinition.Tags = make(map[string]*string, 1)
|
||||||
}
|
}
|
||||||
groupDefinition.Tags[singleContainerTag] = to.StringPtr("")
|
groupDefinition.Tags[tagName] = to.StringPtr("")
|
||||||
|
|
||||||
return createACIContainers(ctx, cs.ctx, groupDefinition)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cs *aciContainerService) Stop(ctx context.Context, containerName string, timeout *uint32) error {
|
func (cs *aciContainerService) Stop(ctx context.Context, containerName string, timeout *uint32) error {
|
||||||
@ -315,6 +319,7 @@ func (cs *aciComposeService) Up(ctx context.Context, opts cli.ProjectOptions) er
|
|||||||
}
|
}
|
||||||
logrus.Debugf("Up on project with name %q\n", project.Name)
|
logrus.Debugf("Up on project with name %q\n", project.Name)
|
||||||
groupDefinition, err := convert.ToContainerGroup(cs.ctx, *project)
|
groupDefinition, err := convert.ToContainerGroup(cs.ctx, *project)
|
||||||
|
addTag(groupDefinition, composeContainerTag)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user