Merge pull request #418 from jsclayton/fix/retain-cmd

Don’t delete cmd when runtime entrypoint is different
pull/459/head
Simon Aronsson 5 years ago committed by GitHub
commit 4748610244
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -153,12 +153,11 @@ func (c Container) runtimeConfig() *dockercontainer.Config {
config.Hostname = "" config.Hostname = ""
} }
if util.SliceEqual(config.Entrypoint, imageConfig.Entrypoint) {
config.Entrypoint = nil
if util.SliceEqual(config.Cmd, imageConfig.Cmd) { if util.SliceEqual(config.Cmd, imageConfig.Cmd) {
config.Cmd = nil config.Cmd = nil
} }
if util.SliceEqual(config.Entrypoint, imageConfig.Entrypoint) {
config.Entrypoint = nil
} }
config.Env = util.SliceSubtract(config.Env, imageConfig.Env) config.Env = util.SliceSubtract(config.Env, imageConfig.Env)

Loading…
Cancel
Save