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

Use of library repo in base image name results in digest diff #1363

Open
mthalman opened this issue Jul 11, 2024 · 2 comments
Open

Use of library repo in base image name results in digest diff #1363

mthalman opened this issue Jul 11, 2024 · 2 comments

Comments

@mthalman
Copy link
Member

From the buildtools-prereqs repo, run this command: .\build.ps1 -DockerfilePath "*almalinux/8/source-build/amd64*". It results in the following exception:

Unhandled exception: System.InvalidOperationException: Found published digest 'sha256:e87da8566de5f0a10e0e6acdb7ca43da4ef97a114130691d7dd737d6923c863d' for tag 'library/almalinux:8' but could not find a matching digest value from the set of locally pulled digests for this tag: almalinux@sha256:e87da8566de5f0a10e0e6acdb7ca43da4ef97a114130691d7dd737d6923c863d. This most likely means that this tag has been updated since it was last pulled.
   at Microsoft.DotNet.ImageBuilder.ManifestServiceExtensions.GetImageDigestAsync(IInnerManifestService manifestService, String image, Boolean isDryRun) in /image-builder/src/ManifestServiceExtensions.cs:line 58

This happens because of the use of the library repo in the Dockerfile's base image name which was done in order to work around #1341. The logic in Image Builder uses that image name to get the digest of the locally pulled image, but the output of that command has library/ stripped from the name:

-- EXECUTING: docker inspect library/almalinux:8 -f "{{ index .RepoDigests }}"
[almalinux@sha256:e87da8566de5f0a10e0e6acdb7ca43da4ef97a114130691d7dd737d6923c863d]

This leads to a diff with the expected digest (e.g. library/almalinux@sha256:e87da8566de5f0a10e0e6acdb7ca43da4ef97a114130691d7dd737d6923c863d), resulting in the exception being thrown.

Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

1 similar comment
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@lbussell lbussell moved this from Backlog to Current Release in .NET Docker Jul 15, 2024
@lbussell lbussell moved this from Current Release to Post Release in .NET Docker Sep 9, 2024
@lbussell lbussell moved this from Post Release to Current Release in .NET Docker Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Current Release
Development

No branches or pull requests

2 participants