Skip to content

[Feature] Support batch import for Docker images #11634

@CN-Scars

Description

@CN-Scars

1Panel Version

v2.0.16

Please describe your needs or suggestions for improvements

The current "Import Image" feature only supports selecting one .tar file at a time. When users need to import multiple image files (e.g., offline deployment, server migration), they have to repeat the operation multiple times, which is inefficient.

It would be helpful to support multi-select in the file picker, allowing batch import of multiple image files at once.

Please describe the solution you suggest

This feature involves both frontend and backend changes. The implementation can reference the existing batch image pull (ImagePull) pattern.

Backend Changes:

File Changes
agent/app/dto/image.go ImageLoad.Path string → Paths []string
agent/app/service/image.go Loop to add subtasks, reference ImagePull implementation
agent/app/api/v2/image.go Adapt to new DTO structure

Frontend Changes:

File Changes
frontend/src/components/file-list/index.vue Add optional multi-select mode (multiple: boolean), maintain backward compatibility
frontend/src/views/container/image/load/index.vue Support displaying list of selected files
frontend/src/api/interface/container.ts Update ImageLoad interface definition

Expected TaskLog Output:

2026/01/13 23:05:04 ImportMirror [image1.tar,image2.tar,image3.tar] task starts [START]
2026/01/13 23:05:04 ----------------- image1.tar -----------------
2026/01/13 23:05:04 Import succeeded
2026/01/13 23:05:05 ----------------- image2.tar -----------------
2026/01/13 23:05:05 Import succeeded
2026/01/13 23:05:06 ----------------- image3.tar -----------------
2026/01/13 23:05:06 Import succeeded
2026/01/13 23:05:06 [TASK-END]

Reference Implementation:

Additional Information

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions