Skip to content

Commit

Permalink
feat: 创建容器后自动启动
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Jun 11, 2024
1 parent 44045da commit 5f504d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/http/controllers/container_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ func (r *ContainerController) ContainerCreate(ctx http.Context) http.Response {
return Error(ctx, http.StatusInternalServerError, err.Error())
}

if err = r.container.ContainerStart(id); err != nil {
return Error(ctx, http.StatusInternalServerError, err.Error())
}

return Success(ctx, id)
}

Expand Down

0 comments on commit 5f504d4

Please sign in to comment.