1
0
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:
Simon Aronsson 2020-02-29 20:19:27 +01:00 committed by GitHub
commit 4748610244
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)