mirror of
https://github.com/containrrr/watchtower.git
synced 2024-12-12 09:04:17 +02:00
Merge pull request #418 from jsclayton/fix/retain-cmd
Don’t delete cmd when runtime entrypoint is different
This commit is contained in:
commit
4748610244
@ -153,12 +153,11 @@ func (c Container) runtimeConfig() *dockercontainer.Config {
|
||||
config.Hostname = ""
|
||||
}
|
||||
|
||||
if util.SliceEqual(config.Cmd, imageConfig.Cmd) {
|
||||
config.Cmd = nil
|
||||
}
|
||||
|
||||
if util.SliceEqual(config.Entrypoint, imageConfig.Entrypoint) {
|
||||
config.Entrypoint = nil
|
||||
if util.SliceEqual(config.Cmd, imageConfig.Cmd) {
|
||||
config.Cmd = nil
|
||||
}
|
||||
}
|
||||
|
||||
config.Env = util.SliceSubtract(config.Env, imageConfig.Env)
|
||||
|
Loading…
Reference in New Issue
Block a user