mirror of
https://github.com/docker/compose.git
synced 2026-08-27 03:45:29 +00:00
detect replacement container is created and inform printer so it attach and don't stop
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
b3ec110612
commit
0f5b5ccbd0
10 changed files with 97 additions and 43 deletions
|
|
@ -468,6 +468,7 @@ type ContainerEvent struct {
|
|||
// This is only suitable for display purposes within Compose, as it's
|
||||
// not guaranteed to be unique across services.
|
||||
Container string
|
||||
ID string
|
||||
Service string
|
||||
Line string
|
||||
// ContainerEventExit only
|
||||
|
|
@ -484,6 +485,8 @@ const (
|
|||
ContainerEventAttach
|
||||
// ContainerEventStopped is a ContainerEvent of type stopped.
|
||||
ContainerEventStopped
|
||||
// ContainerEventRecreated let consumer know container stopped but his being replaced
|
||||
ContainerEventRecreated
|
||||
// ContainerEventExit is a ContainerEvent of type exit. ExitCode is set
|
||||
ContainerEventExit
|
||||
// UserCancel user cancelled compose up, we are stopping containers
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ const (
|
|||
VersionLabel = "com.docker.compose.version"
|
||||
// ImageBuilderLabel stores the builder (classic or BuildKit) used to produce the image.
|
||||
ImageBuilderLabel = "com.docker.compose.image.builder"
|
||||
// ContainerReplaceLabel is set when container is created to replace another container (recreated)
|
||||
ContainerReplaceLabel = "com.docker.compose.replace"
|
||||
)
|
||||
|
||||
// ComposeVersion is the compose tool version as declared by label VersionLabel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue