2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 03:07:20 +08:00

feat: 创建容器不再重复拉取镜像

This commit is contained in:
2026-01-29 17:02:19 +08:00
parent 6a3e0e547a
commit 369ef07f19

View File

@@ -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,