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

Refactored to a set of install scripts to avoid adding further complexity to the base Dockerfile and make it easier to disable tools #385

Merged
merged 2 commits into from
Sep 7, 2024

Conversation

vyadh
Copy link
Contributor

@vyadh vyadh commented Sep 2, 2024

Refactored the Dockerfile.base out into a set of scripts that install the various tools in mostly the same way, just in a more maintainable and legible way. For my purposes the motivation was to make it easier to strip things out and create a minimal image. I've also changed a few things such as the removal of lsb-release, which seemed unnecessary, mainly due to it simplifying the refactoring and to avoid a Python dependency if its not otherwise required. I've tried to make the refactoring steps somewhat easier to follow / diffable via the various commits to make it easier to review.

It does a few less calls to apt update given the up-front sources configuration, and so is a touch faster, but it's not significant (a few 10s of seconds on my machine).

I've tested this and for my purposes it works, though I'm not using many of the tools that are installed in this image.

Somewhat related to #380.

Copy link
Owner

@myoung34 myoung34 left a comment

Choose a reason for hiding this comment

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

I used some free time to add basic tests to this project to make sure that all the logic is captured as assertions
If you'd like to squash all these commits down into one and rebase against master you'll see those run against this and it will help make sure that no user facing behavior is changed

@vyadh
Copy link
Contributor Author

vyadh commented Sep 6, 2024

Ah, great stuff. Thank you for doing that. I'll get on it.

Additionally, this change:
- Configures upfront to reduce number of apt updates
- Removes use of lsb-release to allow simplification and avoid unnecessary dependencies in the base image (i.e. Python)
@myoung34 myoung34 dismissed their stale review September 6, 2024 18:47

Looks mostly ok

@vyadh
Copy link
Contributor Author

vyadh commented Sep 6, 2024

I'll fix the shell check stuff next. I didn't notice there was an action for that. I was relying on IntelliJ telling me issues!

@myoung34
Copy link
Owner

myoung34 commented Sep 7, 2024

🤷 :shipit:
Gotta trust in the tests lol

@myoung34 myoung34 merged commit a8e2276 into myoung34:master Sep 7, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants