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,8 +126,10 @@ func toServiceVolumeConfigsMap(s interface{}) (map[interface{}]interface{}, erro
} }
m := map[interface{}]interface{}{} m := map[interface{}]interface{}{}
for _, v := range volumes { for _, v := range volumes {
if _, exists := m[v.Target]; !exists {
m[v.Target] = v m[v.Target] = v
} }
}
return m, nil return m, nil
} }