docker stack config

environment variable merge is not as expected

Signed-off-by: Stanislav Filin <stasfilin@hotmail.com>
This commit is contained in:
Stanislav Filin 2023-07-13 13:32:28 +00:00
parent dbd53f0419
commit 117c84ee2d
1 changed files with 3 additions and 1 deletions

View File

@ -126,7 +126,9 @@ func toServiceVolumeConfigsMap(s interface{}) (map[interface{}]interface{}, erro
} }
m := map[interface{}]interface{}{} m := map[interface{}]interface{}{}
for _, v := range volumes { for _, v := range volumes {
m[v.Target] = v if _, exists := m[v.Target]; !exists {
m[v.Target] = v
}
} }
return m, nil return m, nil
} }