Skip to content

Split Docker images into base and product images for improved efficiency#323

Merged
ptr727 merged 4 commits intomainfrom
develop
Feb 5, 2026
Merged

Split Docker images into base and product images for improved efficiency#323
ptr727 merged 4 commits intomainfrom
develop

Conversation

@ptr727
Copy link
Owner

@ptr727 ptr727 commented Feb 5, 2026

Refactor the Docker build process by splitting images into base and product variants, enhancing build times and reducing GitHub Actions cache utilization. Update documentation and versioning to reflect these changes. Improve error handling in scripts and workflows.

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
…ify 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>
…ld times and reduce GH actions cache utilization (#322)

* Develop (#319)

* 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>

* Fix syntax in jq command for generating docker hub repositories (#320)

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>

* Update cache-to logic in Docker build step for feature branches (#321)

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>

* Refactor Docker build process and update base images

- 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>

* feat: Split docker images into base and product images to improve build 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>

---------

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 5, 2026 23:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the Docker build architecture to split images into reusable base images and derived product images, improving build efficiency and reducing GitHub Actions cache consumption. The changes include updating the build tooling (.NET CreateMatrix project), shell scripts, GitHub workflows, and documentation to support the new two-tier image architecture.

Changes:

  • Introduced base Docker images (nx-base, nx-base-lsio) containing common dependencies that are built once and reused by all product images
  • Refactored Matrix.json structure to use enums (Product, Branch, Base) with lowercase serialization, replacing the previous CacheScope field
  • Updated all shell scripts to use set -euo pipefail for strict error handling
  • Enhanced GitHub Actions workflows with improved cache strategies and added a dedicated base image build job
  • Updated documentation and version to 2.10

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
version.json Version bump from 2.9 to 2.10
README.md Updated release notes and documented base image architecture
NxWitness.code-workspace Added spell-check dictionary entries for new terms
Make/*.sh Added strict error handling with set -euo pipefail
Make/Matrix.json Restructured to use Product/Branch/Base enum fields instead of CacheScope
Make/Create.sh Removed unused --versionlabel parameter
Make/Build.sh Added base image build functions with cache support
HISTORY.md Added version 2.10 release notes
Docker/download.sh Removed standalone script, replaced with inline bash in Dockerfiles
Docker/*LSIO.Dockerfile Refactored to use ptr727/nx-base-lsio:ubuntu-noble base image
Docker/*.Dockerfile Refactored to use ptr727/nx-base:ubuntu-noble base image
Docker/NxBase.Dockerfile New base image for Ubuntu-based product images
Docker/NxBase-LSIO.Dockerfile New base image for LinuxServer.io-based product images
CreateMatrix/Program.cs Simplified code using AddRange and ForEach
CreateMatrix/MatrixJsonSchema.cs Added LowercaseEnumConverter for enum serialization
CreateMatrix/ImageInfo.cs Refactored to use BranchType and BaseType enums with improved tag generation
CreateMatrix/Dockerfile.cs Added base Dockerfile generation and updated to reference base images
AGENTS.md Updated documentation to reflect base image architecture
.github/workflows/*.yml Updated workflows to build base images, improved cache strategies, removed redundant comments
.github/workflows/build-base-images-task.yml New workflow for building and pushing base images
.github/copilot-instructions.md Updated to document base image architecture

@ptr727 ptr727 merged commit 1b7a5c9 into main Feb 5, 2026
39 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.

1 participant