feat: Split docker images into base and product images to improve build times and reduce GH actions cache utilization#322
Merged
Conversation
* Update docker hub readme task and fix version in README (#316) Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com> * Update GitHub Copilot guidance, enhance Docker build caching, and modify workspace settings (#318) * Update docker hub readme task and fix version in README (#316) (#317) Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com> * Update GitHub Copilot guidance, enhance Docker build caching, and modify workspace settings Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com> --------- Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com> --------- Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
- Removed the download script as it is no longer needed. - Updated build scripts to use `set -euo pipefail` for better error handling. - Created new base Dockerfiles for Nx Witness and Nx Witness LSIO using `ubuntu:noble` and `lsiobase/ubuntu:noble`. - Added GitHub Actions workflow for building base images with multi-platform support. - Updated Matrix.json to include new product branches and improved structure. - Enhanced README with details about the new base images and their purpose. Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
…ld times and reduce GH actions cache utilization chore: Update version to 2.10 in version.json and README.md fix: Ensure consistent formatting in Dockerfiles and scripts docs: Update HISTORY.md and README.md for version 2.10 release notes build: Enhance Build.sh to support pushing base images with inline cache metadata Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request introduces a significant architectural improvement by splitting Docker images into base and product variants to optimize build times and reduce GitHub Actions cache utilization. The project version is updated to 2.10, and comprehensive refactoring has been applied to support the new architecture.
Changes:
- Introduced two base Docker images (
ptr727/nx-base:ubuntu-nobleandptr727/nx-base-lsio:ubuntu-noble) containing common packages, which are used as FROM images for all product Dockerfiles - Refactored C# codebase to use strongly-typed enums (BranchType, BaseType, ProductType) with lowercase JSON serialization for Matrix.json
- Updated all bash scripts to use
set -euo pipefailfor stricter error handling - Improved GitHub Actions workflows with new base image build step and optimized cache strategies
- Replaced external download.sh script with inline bash in Dockerfiles for better maintainability
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| version.json | Bumped version to 2.10 |
| README.md | Documented base images and updated Ubuntu version to noble |
| HISTORY.md | Added release notes for version 2.10 |
| NxWitness.code-workspace | Added spell check words (connrefused, esac, pipefail, tagsargs) |
| Make/*.sh | Updated all scripts to use set -euo pipefail |
| Make/Build.sh | Added BuildBaseDockerfile function and base image building logic |
| Make/Create.sh | Removed --versionlabel parameter |
| Make/Matrix.json | Added Product and Base fields, replaced CacheScope with Base, removed develop-latest tags |
| Docker/download.sh | Removed (replaced with inline bash in Dockerfiles) |
| Docker/NxBase.Dockerfile | New base image with common packages for Ubuntu-based images |
| Docker/NxBase-LSIO.Dockerfile | New base image with common packages for LSIO-based images |
| Docker/*.Dockerfile | All product Dockerfiles updated to use base images and inline download script |
| CreateMatrix/Program.cs | Code refactoring using AddRange and ForEach |
| CreateMatrix/MatrixJsonSchema.cs | Added LowercaseEnumConverter for enum serialization |
| CreateMatrix/ImageInfo.cs | Refactored to use BranchType and BaseType enums, simplified tag logic |
| CreateMatrix/Dockerfile.cs | Added CreateBaseDockerfiles method and updated to reference base images |
| AGENTS.md | Updated documentation for new architecture |
| .github/copilot-instructions.md | Updated guidance for base image architecture |
| .github/workflows/build-base-images-task.yml | New workflow for building base images |
| .github/workflows/build-docker-task.yml | Updated to build base images first and improved cache strategy |
| .github/workflows/*.yml | Removed redundant comments and simplified environment variable usage |
Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
This file contains hidden or 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
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.
chore: Update version to 2.10 in version.json and README.md
fix: Ensure consistent formatting in Dockerfiles and scripts
docs: Update HISTORY.md and README.md for version 2.10 release notes
build: Enhance Build.sh to support pushing base images with inline cache metadata Signed-off-by: Pieter Viljoen ptr727@users.noreply.github.com