MATIH Platform is in active MVP development. Documentation reflects current implementation status.
18. CI/CD & Build System
Stage 02: Base Images

Stage 02: Base Container Images

Stage 02 builds the shared base Docker images that all service images inherit from. Building base images separately enables faster service builds through Docker layer caching.

Source file: scripts/stages/02-build-base-images.sh


Base Images

ImageBasePurpose
matih/base-java:latestEclipse Temurin 21 JRE AlpineJava Spring Boot services
matih/base-python:latestPython 3.11 SlimFastAPI Python services
matih/base-node:latestNode.js 20 AlpineNode.js services
matih/base-nginx:latestNginx 1.25 AlpineFrontend SPA serving

Build Process

# Build base images and push to ACR
./scripts/tools/build-base-images.sh
 
# Each base image is built with multi-arch support
docker buildx build \
    --platform linux/amd64,linux/arm64 \
    --tag ${ACR_URL}/matih/base-java:latest \
    --push \
    infrastructure/docker/base-java/

Dependency Verification

The pipeline verifies base images exist before proceeding:

# Check ACR for base image
az acr repository show --name "${ACR_NAME}" \
    --image "matih/base-java:latest" &>/dev/null
 
# Fallback: check local Docker
docker image inspect "matih/base-java:latest" &>/dev/null

Dependencies

  • Requires: 01-build-setup (Docker buildx configured)
  • Required by: 03-build-commons (commons need base images for testing)