Code Monkey home page Code Monkey logo

Comments (2)

brivu avatar brivu commented on July 29, 2024 1

Hey @sawanoboly,

Thank you for opening this issue. I am not quite clear on what you mean here. Are you able to send me an example of your current manifest and an example of your desired manifest? If you can include links to the documentation to help clarify, that'd be great.

If you'd like this feature to be included in this round of releases, feel free to make the code changes and open a pull request. That way I can review it and potentially merge it to main in the next release.

Thank you!

Best,
Brian

from aws-ecr-orb.

sawanoboly avatar sawanoboly commented on July 29, 2024

@brivu Thanks for the reply 😃

This request is not supported by the standard operation of buildx and may require some complications.

As an example, if you have the following manifest as the latest tag,

{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1780,
         "digest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaa",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1780,
         "digest": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbb",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      }
   ]
}

Image indexes with the latest tag are not subject to the untagged rule of the ECR lifecycle. However, the actual images it contains, sha256:aaaaaaaaaaaaaaaaaaaaaaaaaa, sha256: bbbbbbbbbbbbbbbbbbbbbbbbbbbb, are not tagged, so the life cycle untagged rules will remove untagged rules in the lifecycle will delete them.

I currently exclude myself from the ECR lifecycle, so aaa.... , bbb... images are also tagged.

The script actually used divides the steps as follows

# build both images as : latest_amd64 and : latest_arm64
docker buildx bake --no-cache --load latest


# push amd64 image
docker tag $(IMAGE_NAME): latest_amd64 $(ECR_DOMAIN)/$(IMAGE_NAME):latest_amd64
docker push $(ECR_DOMAIN)/$(IMAGE_NAME): latest_amd64

# push arm64 image
docker tag $(IMAGE_NAME): latest_arm64 $(ECR_DOMAIN)/$(IMAGE_NAME):latest_arm64
docker push $(ECR_DOMAIN)/$(IMAGE_NAME): latest_arm64

# create manifest and push to ECR
docker manifest create \
  $(ECR_DOMAIN)/$(IMAGE_NAME):latest \
  $(ECR_DOMAIN)/$(IMAGE_NAME):latest_amd64 \
  -a $(ECR_DOMAIN)/$(IMAGE_NAME):latest_arm64

docker manifest push $(ECR_DOMAIN)/$(IMAGE_NAME):latest

I am not sure if this is optimal, but so far we have been able to operate successfully with it.
I think it could be made a bit more concise by using buildx's metadata.

Did we convey what we wanted to do?

from aws-ecr-orb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.