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

Support local-only images #1130

Closed
mthalman opened this issue Apr 14, 2023 · 6 comments
Closed

Support local-only images #1130

mthalman opened this issue Apr 14, 2023 · 6 comments

Comments

@mthalman
Copy link
Member

Image Builder doesn't currently support a Dockerfile being configured as "local-only" (meaning the manifest defines all of its tags as isLocal = true). Attempting to do so leads to this issue: dotnet/dotnet-buildtools-prereqs-docker#832 (comment)

An image defined this way would be built locally and could be referenced by other Dockerfiles but the built image wouldn't be published.

Such a Dockerfile can be useful to define shared state that is needed by derived images that do get published or as a common "builder" image. This is the case in the https://github.com/dotnet/dotnet-buildtools-prereqs-docker repo with the Mariner crossdeps-builder Dockerfile. Its used as builder image for several derived Dockerfiles in order to produce those images. But since it's a builder image, it doesn't actually need to be published itself. Because of this limitation in the infrastructure, it needed to be defined with actual tags which forces it to be published (e.g. https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/4485000b802f82a8bbc4222f5c4e37546e3855e2/src/cbl-mariner/manifest.json#L68-L69).

@dotnet-issue-labeler
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.

@mthalman
Copy link
Member Author

[Triage]
It's not known whether there are any other parts of Image Builder that would need to be updated to support this configuration. It's only known at this point that the Build command is affected: dotnet/dotnet-buildtools-prereqs-docker#832 (comment)

@mthalman
Copy link
Member Author

mthalman commented May 29, 2024

There's a greater need for this due to the crossdeps Dockerfiles for Azure Linux/Mariner.

We're wasting time pushing very large images and generating SBOMs for them. For example, azurelinux-3.0-crossdeps-builder is about 3GB compressed. This would also reduce the vulnerability scanning that needs to be done.

@lbussell
Copy link
Contributor

[Triage] Before proceeding, we should determine how long this image takes to build, if this image is ever cached in any builds, and if having the image cached could provide us some value over building it locally every time we use the image.

@mthalman
Copy link
Member Author

mthalman commented Jun 6, 2024

It takes about 1 hr 10 mins to build azurelinux-3.0-crossdeps-builder.

@lbussell
Copy link
Contributor

[Triage] It's not clear whether the crossdeps images are worth building local-only since they take so long to build. Since it's not clear we should leave this as-is for now until there's another compelling reason to implement this feature.

@lbussell lbussell closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants