From 2b9a7df4b2fb4e1500f3b71f1a10793884c24d21 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 23 Oct 2023 15:25:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=AE=B9=E5=99=A8?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E9=BB=98=E8=AE=A4=20Cmd=20=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(#2641)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/container.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/app/service/container.go b/backend/app/service/container.go index 5d77161b4..58f915d9b 100644 --- a/backend/app/service/container.go +++ b/backend/app/service/container.go @@ -342,6 +342,9 @@ func (u *ContainerService) ContainerCreate(req dto.ContainerOperate) error { if len(req.Entrypoint) == 0 { req.Entrypoint = imageInfo.Config.Entrypoint } + if len(req.Cmd) == 0 { + req.Cmd = imageInfo.Config.Cmd + } config, hostConf, networkConf, err := loadConfigInfo(true, req, nil) if err != nil { return err