brand-master/build-custom-base-images.sh
dvirlabs a02ba81b84
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Add offline Python wheels and air-gapped deployment solution
2026-05-05 07:12:21 +03:00

41 lines
1014 B
Bash

#!/bin/bash
# Build custom base images with dependencies pre-installed
# Run this on a machine with internet access, then push to Harbor
set -e
HARBOR_REGISTRY="harbor.dvirlabs.com"
HARBOR_PROJECT="base-images"
echo "🏗️ Building custom base images for air-gapped cluster..."
echo "Registry: $HARBOR_REGISTRY"
echo "Project: $HARBOR_PROJECT"
echo ""
# Login to Harbor
echo "Please login to Harbor:"
docker login $HARBOR_REGISTRY
echo ""
echo "📦 Building Python base image with dev tools..."
echo ""
# Build Python dev image
cd base-images/python-3.11-slim-dev
docker build -t $HARBOR_REGISTRY/$HARBOR_PROJECT/python:3.11-slim-dev .
cd ../..
echo "✅ Built: python:3.11-slim-dev"
echo ""
# Push to Harbor
echo "🚀 Pushing to Harbor..."
docker push $HARBOR_REGISTRY/$HARBOR_PROJECT/python:3.11-slim-dev
echo ""
echo "🎉 Custom base image pushed successfully!"
echo ""
echo "To use this image, update your Dockerfile:"
echo " FROM $HARBOR_REGISTRY/$HARBOR_PROJECT/python:3.11-slim-dev"
echo ""