mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 03:07:20 +08:00
feat: 创建容器不再重复拉取镜像
This commit is contained in:
@@ -100,17 +100,6 @@ func (r *containerRepo) Create(req *request.ContainerCreate) (string, error) {
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
// 拉取镜像
|
||||
out, err := apiClient.ImagePull(ctx, req.Name, client.ImagePullOptions{})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer func(out client.ImagePullResponse) { _ = out.Close() }(out)
|
||||
|
||||
if err = out.Wait(ctx); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// 构建容器配置
|
||||
config := &container.Config{
|
||||
Image: req.Image,
|
||||
|
||||
Reference in New Issue
Block a user