docker-mirror icon indicating copy to clipboard operation
docker-mirror copied to clipboard

add the option skip_remote_tags in the configuration

Open jp opened this issue 5 years ago • 3 comments

This option is useful when using images which are not hosted in docker hub, for example docker.elastic.co/kibana/kibana-oss

A solution more compatible with the current behaviour would be using the authentication of the registry, then list the tags: https://stackoverflow.com/questions/56050765/retrieve-docker-image-tags-from-a-3rd-party-repo

My take was to avoid doing this as it would probably not be compatible with all the docker images providers.

jp avatar Sep 14 '19 17:09 jp

@jp this looks solid :)

I've been using this workaround for it at SeatGeek - using GitHub tags to discover Docker tags

  - name: docker.elastic.co/beats/filebeat
    remote_tags_source: "github"
    remote_tags_config:
      owner: elastic
      repo: kibana
      num_releases: 10
    match_tag:
      - "5*"
      - "6*"

jippi avatar Sep 15 '19 07:09 jippi

@jippi thanks for the feedback, this is indeed working with the following configuration.

repositories:
  - name: docker.elastic.co/kibana/kibana-oss
    remote_tags_source: "github"
    remote_tags_config:
      owner: elastic
      repo: kibana
      num_releases: 30
    match_tag:
      - "6.4.3"

I just need to tweak num_releases high enough so it is fetching the good number of tags so I can get the specific release I need (6.4.3 in the 30th in the tag list).

So no need to add skip_remote_tags unless you feel this could be useful for other situations.

jp avatar Sep 16 '19 12:09 jp

I think this feature is still useful, since setting the max number can be britle, and as time pass it would you would need to enlarge it.

I guess one less API also makes it a bit faster. small step, and the moon landing, but something.

fruch avatar Jan 31 '20 05:01 fruch