feat: add image fetch with proxy support and registry proxy config
Backend: - Add image fetch handler using go-containerregistry - Support HTTP/HTTPS and SOCKS5 proxy protocols - Pull images from remote registries (Docker Hub, etc.) - Store fetched images as blobs and manifests - Add timeout handling (60s for descriptor fetch) - Add detailed logging for pull progress - Add /api/v1/registry/image/fetch endpoint Frontend: - Add registry proxy configuration field - Add "获取镜像" button and dialog - Add proxy checkbox and input in fetch dialog - Add LinearProgress feedback during fetch - Add multi-stage Snackbar notifications - Auto-refresh image list after successful fetch - Fix download filename regex (remove trailing quote) - Adjust button colors for better UI consistency Dependencies: - Add github.com/google/go-containerregistry for OCI operations - Add golang.org/x/net/proxy for SOCKS5 support 🤖 Generated with [Qoder](https://qoder.com)
This commit is contained in:
@@ -47,6 +47,7 @@ func Init(ctx context.Context, address string, db *gorm.DB, store store.Store) (
|
||||
registryAPI.Get("/image/list", registry.RegistryImageList(ctx, db, store))
|
||||
registryAPI.Get("/image/download/*", registry.RegistryImageDownload(ctx, db, store))
|
||||
registryAPI.Post("/image/upload", registry.RegistryImageUpload(ctx, db, store))
|
||||
registryAPI.Post("/image/fetch", registry.RegistryImageFetch(ctx, db, store))
|
||||
// registry config apis
|
||||
registryAPI.Get("/config", registry.RegistryConfigGet(ctx, db, store))
|
||||
registryAPI.Post("/config", registry.RegistryConfigSet(ctx, db, store))
|
||||
|
||||
Reference in New Issue
Block a user