Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Repository Image Search by {description, platform} #8256

Open
ncultra opened this issue Sep 26, 2014 · 4 comments
Open

Proposal: Repository Image Search by {description, platform} #8256

ncultra opened this issue Sep 26, 2014 · 4 comments
Labels
area/distribution kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny

Comments

@ncultra
Copy link

ncultra commented Sep 26, 2014

With prototype ports of Docker to aarch64, Power LE, and s390 it has become apparent that we need to search and pull images from a repository based (in part) on the architectural platform they are built for.

Today repository search accepts a string which is then used to search the description field for each image. The list of images that hit are returned in a dictionary {'name': name 'description':description}.

The description field can be augmented by a single tag; the custom is to use a tag to indicate a release or build, just as you would use a tag in a source code control system.

Adding an optional platform field to the search term would allow a more precise image search when the native platform is important. There would bee no need to overload the description or tag data for an image. There is no need to alter the return value of repository search.

@duglin
Copy link
Contributor

duglin commented Sep 26, 2014

One of the biggest design points around this would probably be: are two images of the same thing, but for two different platforms, variants of the same "image" or two different images? I think this will influence whether a "platform" type of field is more like a view over shared data, just extra metadata like "description" or part of the unique naming aspect of the image - much like username, name and tag. My current thinking is that they are two independent images - with no relationship. "Platform" is just another search term (like name) but not part of the naming of the image.

In thinking about this it would seem we could do the following:
Docker CLI:

  • allow for an optional "platform" parameter to be specified on push, pull, search and tag
  • if not specified, the cli will use the current env's value - e.g. what "uname -a" might return
  • "docker search" should probably allow for some wildcarding (e.g. -p * to mean any/all)

Registry:

  • add a "platform" field as a sibling to "description"
  • if absent on push,pull,tag it defaults to current (x86?)
  • if absent on search it defaults to all/any
  • we probably need to add a new API to allow for people to ask for the list of available "platform" values - see comment below.

Dockerfile/FROM:

  • modify the syntax to: FROM [:tag] [platform]
  • if not present the current env's value should be used on the resulting pull

Additionally, we should consider whether this field is "free form" or "locked down" by the registry's admin? In order to ensure people don't run into typo/naming/... issues, I think this should be a configurable aspect of the registry, but most people will probably choose to lock it down and therefore we need a config mechanism by which the registry admin can indicate the list of valid values.

Not sure if it should be "platform" or "arch" - but that's a minor point :-)
Anyway, just some initial thoughts for people to throw arrows at.

@ncultra ncultra changed the title Repository Image Search by {description, platform} Proposal: Repository Image Search by {description, platform} Sep 26, 2014
@jessfraz jessfraz added kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny Proposal and removed Proposal labels Feb 26, 2015
@stevvooe
Copy link
Contributor

There are few relevant tickets happening in distribution. The first is the new manifest proposal, which will support multi-architecture images: distribution/distribution#62. The other is the ongoing effort to define a scalable search API for the v2 registry system distribution/distribution#206.

@LK4D4
Copy link
Contributor

LK4D4 commented Sep 15, 2016

@stevvooe @dmcgowan is this still an issue?

@dmcgowan
Copy link
Member

This feature request is still valid. The search API has not been updated and V2 updates remain in the design phase pending an owner to take it on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distribution kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny
Projects
None yet
Development

No branches or pull requests

6 participants