Clear Cmd when setting Entrypoint (#624)

See https://github.com/chainguard-dev/apko/issues/22
This commit is contained in:
jonjohnsonjr
2022-02-28 16:55:57 -08:00
committed by GitHub
parent 56e14a1418
commit 66bd5fc8a5
+1
View File
@@ -776,6 +776,7 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl
cfg = cfg.DeepCopy()
cfg.Config.Entrypoint = []string{appPath}
cfg.Config.Cmd = nil
if platform.OS == "windows" {
cfg.Config.Entrypoint = []string{`C:\ko-app\` + appFilename(ref.Path())}
updatePath(cfg, `C:\ko-app`)