From 4f120ef037cb79db6895e20d542cd301dcbb3cc8 Mon Sep 17 00:00:00 2001 From: John Clayton Date: Wed, 18 Dec 2019 16:40:02 -0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20delete=20cmd=20when=20runtime?= =?UTF-8?q?=20entrypoint=20is=20different?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/container/container.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/container/container.go b/pkg/container/container.go index 09e4225..a4db4cf 100644 --- a/pkg/container/container.go +++ b/pkg/container/container.go @@ -143,12 +143,11 @@ func (c Container) runtimeConfig() *dockercontainer.Config { config.User = "" } - 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)