mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
commit: do not change container labels on commit
Fix #29547 Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
@@ -65,11 +65,10 @@ func merge(userConf, imageConf *containertypes.Config) error {
|
||||
if userConf.Labels == nil {
|
||||
userConf.Labels = map[string]string{}
|
||||
}
|
||||
if imageConf.Labels != nil {
|
||||
for l := range userConf.Labels {
|
||||
imageConf.Labels[l] = userConf.Labels[l]
|
||||
for l, v := range imageConf.Labels {
|
||||
if _, ok := userConf.Labels[l]; !ok {
|
||||
userConf.Labels[l] = v
|
||||
}
|
||||
userConf.Labels = imageConf.Labels
|
||||
}
|
||||
|
||||
if len(userConf.Entrypoint) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user