aws / aws/containers-roadmap

[ECR] [Feature request]: Allow image re-tagging for OCI media type

Open
#1,873 0 comments 10 reactions 0 assignees View on GitHub
ECR Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

**Tell us about your request**
Enable image re-tagging for OCI media types.

**Which service(s) is this request for?**
ECR

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
I'd like to add a new tag to an existing image, as described in the documentation:
https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-retag.html

However, this feature is only supported for docker image types, and as my image type is OCI, the command throws an error:
`An error occurred (InvalidParameterException) when calling the PutImage operation: Invalid parameter at 'ImageManifest' failed to satisfy constraint: 'Invalid JSON syntax'`

Opened an AWS support case to confirm the issue: 11136098231

Reply:
```
Issue:
When attempting to retag an OCI media type: application/vnd.oci.image.config.v1+json,
you receive the error:
An error occurred (InvalidParameterException) when calling the PutImage operation: Invalid parameter at 'ImageManifest' failed to satisfy constraint: 'Invalid JSON syntax'

Investigation:
When I attempted to replicate the issue, I was able to correctly retag the image however my image was of the media type
\"application/vnd.docker.container.image.v1+json\"

The documentation [1] states, \"With Docker Image Manifest V2 Schema 2 images, you can use the --image-tag option of the put-image command to retag an existing image\". As your image is not of the Docker Image Manifest V2 Schema 2 type, the image fails to have a consistent json output and therfore the image fails to be tagged through the put-image command.

I attempted to locate an alternative method but was unable to. I recommended that you open a github issue on the Containers roadmap [2] to help give your feature request further visibility to the service team which manages ECR.
```

**Are you currently working around this issue?**
No solutions so far.

**Additional context**
manifest.json example:
```
{\"schemaVersion\":2,\"config\":{\"mediaType\":\"application/vnd.oci.image.config.v1+json\",\"digest\":\"sha256:xxxxxx\",\"size\":1234},\"layers\":[{\"mediaType\":\"application/vnd.oci.image.layer.v1.tar+gzip\",\"digest\":\"sha256:xxxxx\",\"size\":12345678}]}
```

**Attachments**
If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked ECR image-retagging documentation and reviewing the reported PutImage error with the provided OCI manifest.json example. Done would mean ECR accepts the OCI media type and allows an existing image to be retagged with the image-tag option; the repository does not identify implementation files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker
Domain
cloud, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.