Skip to content

exporter: export ref name in oci tarball #227

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

Closed
wants to merge 1 commit into from

Conversation

tonistiigi
Copy link
Member

Signed-off-by: Tonis Tiigi [email protected]

@tonistiigi tonistiigi mentioned this pull request Dec 18, 2017
@@ -280,11 +280,13 @@ func testOCIExporter(t *testing.T, sb integration.Sandbox) {
defer os.RemoveAll(destDir)

out := filepath.Join(destDir, "out.tar")
target := "docker.io/buildkit/testoci:latest"
Copy link
Member

Choose a reason for hiding this comment

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

nit: docker.io/buildkit is owned by somebody else: https://hub.docker.com/u/buildkit/

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

LGTM except a nit

@tonistiigi
Copy link
Member Author

Updated

@@ -280,11 +280,13 @@ func testOCIExporter(t *testing.T, sb integration.Sandbox) {
defer os.RemoveAll(destDir)

out := filepath.Join(destDir, "out.tar")
target := "example.com/buildkit/testoci:latest"
Copy link
Member

Choose a reason for hiding this comment

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

Sorry for going back and forth, but could you add a testcase for target := "latest", as it seems the most expected value of org.opencontainers.image.ref.name. (example.com/buildkit/testoci:latest is also correct though)

Copy link
Member Author

@tonistiigi tonistiigi Dec 18, 2017

Choose a reason for hiding this comment

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

Is there a place I can read up for this value? I would expect "target=latest" to produce either error or docker.io/library/latest:latest. (the fix for this in #228 produces the latter)

Copy link
Member

Choose a reason for hiding this comment

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

For OCI, I'd suggest not normalizing the string. i.e. target=latest should set the annotation to latest, literally.

For OCI manifest within Docker-OCI-hybrid image, I'd suggest setting the "tag" portion of the Docker-normalized name.

@tonistiigi
Copy link
Member Author

@AkihiroSuda So how about I revert this for now (only leave RepoTags) and later we can add export opts for all the values in https://github.com/opencontainers/image-spec/blob/master/specs-go/v1/annotations.go that make sense. Eg --exporter-opt org.opencontainers.image.ref.name=foobar . name= will only work in docker, containerd image store and pushing to registry

@AkihiroSuda
Copy link
Member

Yes, it seems the safest now

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.

2 participants