Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

lib: allow to specify registry and mediatype options #216

Closed
lucab opened this issue Oct 25, 2016 · 3 comments
Closed

lib: allow to specify registry and mediatype options #216

lucab opened this issue Oct 25, 2016 · 3 comments

Comments

@lucab
Copy link
Contributor

lucab commented Oct 25, 2016

docker2aci (library and standalone binary), should allow the callers to specify a union-set of acceptable registry and mediatype options. This is needed to let consumers specify a certain mediatype to avoid (eg. OCI before stabilization) or certain registry features to enforce (eg. downgrade to registry-v1 or enforce DCT).

From the CLI, this may translate into:

  • --registry-options=[registry-v1,registry-v2,registry-v2-dtc] with an auto default covering plain v1+v2 for the moment.
  • --mediatype-options=[docker-v1,docker-v2.1,docker-v2.2,oci-v1.pre] with an auto default covering docker types for the moment.

For the lib, this will translate into appropriate parameters to all backend types.

@lucab
Copy link
Contributor Author

lucab commented Oct 25, 2016

I did an initial investigation into this, and it seems to require a non-trivial amount of reworking/cleanup both on the internal types and the exposed interface; for these reasons it was deferred post-0.13.

I'm assigning to @s-urbaniak for the design and implementation of the interface/types rework. CLI changes are nice to have but not required at first.

As we are most probably changing the external lib interface, it would be nice to already start to account for:

@cgonyeo
Copy link
Member

cgonyeo commented Jan 19, 2017

I don't like the concept of these flags, docker2aci should be able to auto-determine (and currently can) which mediatypes to use in a given situation. If v2 pulling is supported, it'll do v2 pulling accepting both v2.1 and v2.2 content, and if v2 pulling is unsupported it will automatically fall back to V1 pulling. I'm not sure a user would ever want to selectively disable one of these.

I'm currently making a PR for hiding OCI support behind a flag, but I've got other thoughts on that I'll describe in that PR.

@s-urbaniak
Copy link

Cross-referencing #236 (comment) as it describes the rationale behind this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants