only check volume mounts for updated config

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2024-12-16 08:55:09 +01:00 committed by Nicolas De loof
parent a20b69ac5b
commit 038c81f34e
1 changed files with 3 additions and 0 deletions

View File

@ -384,6 +384,9 @@ func checkExpectedNetworks(expected types.ServiceConfig, actual moby.Container,
func checkExpectedVolumes(expected types.ServiceConfig, actual moby.Container, volumes map[string]string) bool {
// check container's volume mounts and search for the expected ones
for _, vol := range expected.Volumes {
if vol.Type != string(mmount.TypeVolume) {
continue
}
id := volumes[vol.Source]
found := false
for _, mount := range actual.Mounts {