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

Extract common operations to reusable scripts in base images #716

Merged
merged 17 commits into from
Apr 18, 2024

Conversation

ianpittwood
Copy link
Collaborator

@ianpittwood ianpittwood commented Apr 2, 2024

Closes #616

This change implements scripts we currently use for building Marketplaces images using Packer. By including these common scripts we can reduce the complexity of individual Dockerfiles in future changes, easily modify or extend downstream images, and increase our code sharing for common operations.

Adds

  • Shared scripts for both Ubuntu and RHEL-based OSes
    • install_python.sh
    • install_r.sh
    • install_quarto.sh
    • install_drivers.sh
    • apt.sh or yum.sh for package management Ubuntu and RHEL respectively

Changes

  • Updates product/base and product/pro images to use shared scripts for installing dependencies.
  • Extracts dependencies to text files stored in deps/ for both base image directories.

@ianpittwood ianpittwood changed the base branch from dev to feat-bake-goss April 10, 2024 18:53
Base automatically changed from feat-bake-goss to dev April 16, 2024 20:13
@ianpittwood ianpittwood marked this pull request as ready for review April 16, 2024 21:01
@ianpittwood ianpittwood mentioned this pull request Apr 18, 2024
@ianpittwood ianpittwood requested a review from nahara7 April 18, 2024 17:59
Copy link
Contributor

@kfeinauer kfeinauer left a comment

Choose a reason for hiding this comment

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

Aside from that minor script nit, LGTM!

*)
# Allow clean, update to be used as commands
if [ "$UPDATE" -eq 1 ] || [ "$CLEAN" -eq 1 ]; then
exit 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider sharing logic with yum script? Lots of similarities in these two scripts. Just a suggestion, not a hard blocker.

Copy link
Contributor

@nahara7 nahara7 left a comment

Choose a reason for hiding this comment

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

So much neater !

@ianpittwood ianpittwood merged commit 0d64e87 into dev Apr 18, 2024
34 checks passed
@ianpittwood ianpittwood deleted the base-image-scripts branch April 18, 2024 21:04
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.

Extract common RUN blocks to shared scripts
3 participants