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

Allow pulling from a docker reference with tag and digest #783

Closed
mgoltzsche opened this issue Dec 29, 2019 · 1 comment
Closed

Allow pulling from a docker reference with tag and digest #783

mgoltzsche opened this issue Dec 29, 2019 · 1 comment

Comments

@mgoltzsche
Copy link
Contributor

mgoltzsche commented Dec 29, 2019

Docker's image pull syntax repo/image:tag@sha should be supported as well for compatibility reasons - despite its ambiguity.
I came across this problem using skaffold and CRI-O.

The current code already handles pulling such image references by digest properly. However a dockerReference construction explicitly fails when both tag and digest are specified.

mgoltzsche added a commit to mgoltzsche/image that referenced this issue Dec 29, 2019
mgoltzsche added a commit to mgoltzsche/image that referenced this issue Dec 29, 2019
Refers to containers#783.

Changes:
- Move the code that returns an error when both tag and digest are
  present from `newReference` to `reference.newImageDestination`
  allowing pulls but no pushes.
- Use digest instead of tag as `DockerReferenceIdentity` or rather
  for policy matching.
- Adjusted tests.
mgoltzsche added a commit to mgoltzsche/image that referenced this issue Dec 29, 2019
Refers to containers#783.

Changes:
- Moved the code that returns an error when both tag and digest are
  present from `newReference` to `reference.newImageDestination`
  allowing pulls but no pushes.
- If present use digest instead of tag as `DockerReferenceIdentity`
  or rather for policy matching.
- Adjusted tests.
@mgoltzsche mgoltzsche changed the title Allow parsing docker reference with tag and digest Allow pulling from a docker reference with tag and digest Dec 29, 2019
mgoltzsche added a commit to mgoltzsche/image that referenced this issue Dec 29, 2019
Refers to containers#783.

Changes:
- Moved the code that returns an error when both tag and digest are
  present from `newReference` to `reference.newImageDestination`
  allowing pulls but no pushes.
- If present use digest instead of tag as `DockerReferenceIdentity`
  or rather for policy matching.
- Adjusted tests.

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
mgoltzsche added a commit to mgoltzsche/image that referenced this issue Dec 29, 2019
Refers to containers#783.

Changes:
- Moved the code that returns an error when both tag and digest are
  present from `newReference` to `reference.newImageDestination` in
  order to allow pulls but no pushes.
- If present use digest instead of tag as `DockerReferenceIdentity`
  or rather for policy matching.
- Adjusted tests.

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
mgoltzsche added a commit to mgoltzsche/image that referenced this issue Dec 29, 2019
Refers to containers#783.

Changes:
- Moved the code that returns an error when both tag and digest are
  present from `newReference` to `reference.newImageDestination` in
  order to allow pulls but no pushes.
- If present use digest instead of tag as `DockerReferenceIdentity`
  or rather for policy matching.
- Adjusted tests.

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
mgoltzsche added a commit to mgoltzsche/image that referenced this issue Dec 29, 2019
Refers to containers#783.

Changes:
- Moved the code that returns an error when both tag and digest are
  present from `newReference` to `reference.newImageDestination` in
  order to allow pulls but no pushes.
- If present use digest instead of tag as `DockerReferenceIdentity`
  or rather for policy matching.
- Adjusted tests.

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
@mgoltzsche
Copy link
Contributor Author

Closed in favour of a better solution within CRI-O.

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

No branches or pull requests

1 participant