mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-23 08:00:55 +00:00
fix: 解决容器创建默认 Cmd 失败的问题 (#2641)
This commit is contained in:
committed by
wanghe-fit2cloud
parent
61bbfac3cd
commit
c90ad0f4ed
@@ -331,6 +331,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
|
||||
|
||||
Reference in New Issue
Block a user