goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
24.31k stars 4.77k forks source link

How to replicate specified arch images from DockerHub? #19864

Open vndroid opened 10 months ago

vndroid commented 10 months ago

The Docker Hub's Official Image has multi-arch sub-image. But I only need a part of them, how can I do automatic filtering while replicating?

Example: PHP has these arch sub-image:

linux /amd64
linux /arm/v6 
linux /arm/v7 
linux /arm64/v8 
linux /386 
linux /ppc64le 
linux /s390x 

I need only the amd64 and arm64/v8, What can I do it?

chlins commented 10 months ago

Currently replication does not support filter single arch when the target image is a multi-arch image.

jp1337 commented 8 months ago

Hi there 👋 I really like the multi-arch feature, but in some cases a filter would be nice. For example the mongodb image on DockerHub has images for linux and for windows. I am running a kubernetes cluster on linux nodes and only need the linux images. But the cluster is running on arm64 and amd64 nodes. So multi-arch is a good feature. The windows images now bloat my harbor instance and since I am running on slow-speed internet the replication is taking very long. My idea is to provide a filter so in my case there would be two replication tasks. One for arm64 and one for amd64.

image

jidaojiuyou commented 3 months ago

look at crane index filter

kofj commented 3 months ago

should we support arch filter?

ludd98 commented 2 months ago

Yes, this is a needed feature. Some images have many arch so it takes up quite alot of space. I am only intrested in one arch for my clusters.