-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Common base layer optimization #220
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
ShutdownRepo
added
enhancement
New feature or request
and removed
documentation
Improvements or additions to documentation
labels
Aug 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Before this change, all images had a
debian:11-slim
base layer, while all images shared a common stack (package_base.sh
). After this change, images will have aexegol:base
base layer. This base image is common for all release images (ad, osint, full, light, web) so that some space is saved if a user downloads more than one.Created four new DockerHub registries:
Pipelines are changed accordingly and will now be structured as follows.
Pipelines were also greatly improved in the process.
Brainstorm log
Not doing multi stage because our use case doesn't allow it.
Let
imageA
andimageB
share common install packages:While
RUN package4.sh
is common for both images, Docker layers are dependent on theirn-1
layer.In this example,
imageA(layer4) ≠ imageB(layer2)
even if the samepackage4.sh
is called. We can't just have an exegol image per package, and them "add" them together. Docker doesn't work like this.We could however build an image for each package and move files around like explained in Docker's multi-stage building docs but it would require a huge refactor of the way we develop and build new images (
.sh
packages, pipelines, tool install functions, ...). We also think it would negatively impact the whole project as contributing to it would be harder, and we need the project to stay community-centric.Our conclusion: not doing multi-stage, but instead optimize what we can with having a common base for all images. We deem it to be the right balance between technical optimization and user/developer experience.
resolves #96