Azure / acr-builder

Azure Container Registry Build Runner
MIT License
38 stars 35 forks source link

Cannot track dependencies when using build cache #522

Closed shahzzzam closed 3 years ago

shahzzzam commented 5 years ago

Describe the bug When using build cache, the dependencies cannot be tracked (queried for digest). Reason: Because we build the image using buildx, but query the digest using docker. buildx and docker have two separate stores. We can load the final built image into docker by using the --load flag of buildx, but unfortunately buildx does not load all the other dependent images by design.

Solution: We need to be able to use something like docker manifest inspect base_dependency and grab the master digest of the image.

Currently docker manifest inspect does not support getting the master manifest if the image. So can PR into docker-cli. Or, can acb can use the dockerApi to make /manifest call, and parse the object to fetch sha digest.

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Any relevant environment information

Additional context Add any other context about the problem here.

shahzzzam commented 4 years ago

can use https://github.com/containers/image library