Files
hub/docker/base/build-and-push.sh
kelly 486c16d0fa
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci: optimize deploy time with pre-built base image and parallel steps
- Add docker/base/Dockerfile with pre-compiled PHP extensions
- Add Dockerfile.fast using pre-built base image (~2-3 min vs 15-20 min)
- Add docker/base/build-and-push.sh script for base image management
- Update CI to run composer-install and build-frontend in PARALLEL
- Both steps complete before build-image starts

Expected improvement: 20-30 min → ~10 min deploys

To activate: Run ./docker/base/build-and-push.sh once from a Docker host
2025-12-15 19:40:13 -07:00

23 lines
553 B
Bash
Executable File

#!/bin/bash
# Build and push the base image to local registry
# Run this ONCE, then CI will use it for fast builds
#
# Usage: ./docker/base/build-and-push.sh
set -e
REGISTRY="10.100.9.70:5000"
IMAGE="cannabrands/hub-base"
TAG="latest"
echo "Building base image..."
docker build -t ${REGISTRY}/${IMAGE}:${TAG} -f docker/base/Dockerfile .
echo "Pushing to registry..."
docker push ${REGISTRY}/${IMAGE}:${TAG}
echo ""
echo "✅ Base image ready: ${REGISTRY}/${IMAGE}:${TAG}"
echo ""
echo "CI will now use this for fast builds (~2-3 min vs 15-20 min)"