41 lines
1005 B
Batchfile
41 lines
1005 B
Batchfile
@echo off
|
|
REM Build custom base images with dependencies pre-installed
|
|
REM Run this on a machine with internet access, then push to Harbor
|
|
|
|
set HARBOR_REGISTRY=harbor.dvirlabs.com
|
|
set HARBOR_PROJECT=base-images
|
|
|
|
echo.
|
|
echo 🏗️ Building custom base images for air-gapped cluster...
|
|
echo Registry: %HARBOR_REGISTRY%
|
|
echo Project: %HARBOR_PROJECT%
|
|
echo.
|
|
|
|
REM Login to Harbor
|
|
echo Please login to Harbor:
|
|
docker login %HARBOR_REGISTRY%
|
|
|
|
echo.
|
|
echo 📦 Building Python base image with dev tools...
|
|
echo.
|
|
|
|
REM 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.
|
|
|
|
REM 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.
|
|
pause
|