Skip to content

Commit

Permalink
fix: 解决容器创建默认 Cmd 失败的问题 (#2641)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu authored and wanghe-fit2cloud committed Oct 23, 2023
1 parent 61bbfac commit c90ad0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/app/service/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c90ad0f

Please sign in to comment.