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

oci transport will remove existing images #306

Closed
cyphar opened this issue Jul 13, 2017 · 5 comments
Closed

oci transport will remove existing images #306

cyphar opened this issue Jul 13, 2017 · 5 comments

Comments

@cyphar
Copy link
Contributor

cyphar commented Jul 13, 2017

If you try to have a multi-tag image with skopeo (by copying to different tags), then it will delete old tags. I also have a feeling that manifests without tags will be really broken. You can verify this fairly trivially by doing:

% skopeo copy docker://opensuse/amd64:42.2 oci:opensuse:latest
% skopeo copy docker://opensuse/amd64:42.1 oci:opensuse:42.1
% jq . opensuse/index.json
{
  "schemaVersion": 2,
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:6842a022e2395f4d03350f5917908b4efc1aa80c302990dc74a577ebd7df0bff",
      "size": 349,
      "annotations": {
        "org.opencontainers.image.ref.name": "42.1"
      },
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      }
    }
  ]
}

I'll investigate this later. I found this while trying to increase umoci's testing.

@cyphar
Copy link
Contributor Author

cyphar commented Jul 13, 2017

For reference, IMO this should be handled in a similar way to umoci's oci/casext.UpdateReference implementation.

@cyphar
Copy link
Contributor Author

cyphar commented Jul 13, 2017

I believe this is related to containers/skopeo#369.

@mtrmac
Copy link
Collaborator

mtrmac commented Jul 14, 2017

I don’t think this is containers/skopeo#369 ; it’s just that ociDestination.Commit ignores any pre-existing index and overwrites it with a single-manifest index for the just written manifest. That’s not intentional, contributions to fix this would be welcome.

(Also discussed in #155 .)

@rhatdan
Copy link
Member

rhatdan commented Apr 25, 2019

@mtrmac @cyphar Is this still an issue, Just going through old issues and trying to clean them up.

@mtrmac
Copy link
Collaborator

mtrmac commented May 7, 2019

This was fixed in #326 ; when a tag is specified, only that image in the index is added/replaced without affecting other tags. (When no tag is specified, it seems that the first untagged image or image with an empty tag is added/replaced.)

(Note that this does not allow multi-arch images, with the various architectures sharing a tag, yet; see #400 for some work in that direction.)

@mtrmac mtrmac closed this as completed May 7, 2019
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

3 participants