Skip to content

Conversation

@mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Nov 19, 2016

This fixes #143 , by deciding on a reference format and implementing it.

Allow either a !NameOnly named reference, or a sha256:hex digest. Both forms can be used for an ImageSource; ImageDestination accepts only a name:tag value.

Because the sha256:hex reference values make it impossible to create a reasonable policy hierarchy, only support a trivial namespace with a single per-transport policy.

This does not yet deal with the way projectatomic/docker/reference breaks the normalization (#72).

@mtrmac mtrmac changed the title WIP: Finish docker-daemon: Finish docker-daemon: Nov 21, 2016
@mtrmac
Copy link
Collaborator Author

mtrmac commented Nov 21, 2016

Now also fixes #72 , making this PR ready for review.

We now rely on types.Image.UpdatedImage and copy.Image to do the
necessary conversions.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This requires renaming the image struct to dockerImage to avoid a naming
conflict with containers/image/image .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Allow either a !NameOnly named reference, or a sha256:hex digest.  Both
forms can be used for an ImageSource; ImageDestination accepts only a
name:tag value.

Because the sha256:hex reference values make it impossible to create
a reasonable policy hierarchy, only support a trivial namespace with
a single per-transport policy.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
…load)

This makes the tagging behavior consistent with (docker pull) for
projectatomic/docker, and does not change behavior for docker/docker.

See the added comment, and containers#72 ,
for more explanation.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
// Based on github.com/docker/docker/image/image.go
// MOST CONTENT OMITTED AS UNNECESSARY
type image struct {
type dockerImage struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we plan to have other *Image types? just image was nice to have. Not a blocker, feel free to skip this comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only necessary to make it possible to import containers/image/image, as 29838ec says.

@runcom
Copy link
Member

runcom commented Nov 23, 2016

lgtm

Approved with PullApprove

@mtrmac
Copy link
Collaborator Author

mtrmac commented Nov 23, 2016

👍

Thanks!

Approved with PullApprove

@mtrmac mtrmac merged commit 42413da into containers:master Nov 23, 2016
@mtrmac mtrmac deleted the docker-daemon branch November 23, 2016 17:04
giuseppe pushed a commit to giuseppe/image that referenced this pull request Jan 24, 2017
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

Successfully merging this pull request may close these issues.

Finish docker-daemon:

2 participants