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

✨ Refactor Dockerfiles for Ubuntu based flavors #1656

Merged
merged 3 commits into from
Jul 31, 2023

Conversation

mauromorales
Copy link
Member

I was looking into adding the different packages requested in #1620 and noticed that we again have differences in our Dockerfiles, so I decided to do a POC to evaluate a better way to maintain them, and here's my proposal, which is what I already mentioned in #1400

The major change is to go from individual Dockerfiles per flavor within the same distro, to having a single one for the distro using stage-builds. The reason why I think this makes sense is that most of the content of these files is supposed to be shared across flavors based on a single distribution, and only specific packages or scripts need to run for each different flavor within that distro.

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
@mauromorales mauromorales requested a review from a team July 27, 2023 14:25
@mauromorales mauromorales added the refactoring Areas of code that needs refactoring, or have a technical debt label Jul 27, 2023
@@ -80,6 +75,61 @@ RUN apt-get update \
zstd \
&& apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*

# Packages and scripts only for specific images
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my guess is that most of the files that are not consistent accross the Dockerfiles on master, are not because they are specifically required but because we failed to keep them in sync. But even with those differences, you can see how this section is actually pretty small and makes it easy to eval the differences between distro versions.

@mauromorales mauromorales self-assigned this Jul 31, 2023
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
@mauromorales
Copy link
Member Author

Merging since it was agreed during daily. Will open a new PR to address other distros

@mauromorales mauromorales merged commit adbba85 into master Jul 31, 2023
8 checks passed
@mauromorales mauromorales deleted the refactor-dockerfiles branch July 31, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Areas of code that needs refactoring, or have a technical debt
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

1 participant