Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Denormalise image refs from registry cache #880

Merged
merged 1 commit into from
Dec 21, 2017

Conversation

squaremo
Copy link
Member

When fetching image metadata, we canonicalise the image name, so that
we can fetch it using any of its possible names (e.g., alpine,
library/alpine, index.docker.io/library/alpine).

When fetching though, we must remember to reconstruct the image refs
as though they used the original form of name.

To guard against getting this wrong again, I've put the
ImageMap (map of image name to image metadata, effectively) in a
struct so it can't be indexed directly.

When fetching image metadata, we canonicalise the image name, so that
we can fetch it using any of its possible names (e.g., alpine,
library/alpine, index.docker.io/library/alpine).

When fetching though, we must remember to reconstruct the image refs
as though they used the original form of name.

To guard against getting this wrong again, I've put the
`ImageMap` (map of image name to image metadata, effectively) in a
struct so it can't be indexed directly.
@samb1729 samb1729 merged commit 5e89205 into master Dec 21, 2017
@samb1729 samb1729 deleted the more-noncanonicalisation branch December 21, 2017 16:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants