Files
peikarband/build-base-image.sh
Ehsan.Asadi 5fed68fc54
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
chore: add repository strategy doc and helper scripts
- Add docs/REPOSITORY_STRATEGY.md for future reference
- Add build-base-image.sh for local base image build
- Add restore-files.sh for pipeline file management
- Restore correct pipeline file names
2025-12-30 21:56:58 +03:30

44 lines
970 B
Bash
Executable File

#!/bin/bash
# Helper script to build and push base image locally
set -e
echo "=== Building Peikarband Base Image ==="
echo ""
# Variables
REGISTRY="hub.peikarband.ir"
IMAGE="$REGISTRY/peikarband/base"
# Build
echo "1. Building base image..."
docker build \
-f docker/Dockerfile.base \
-t "$IMAGE:latest" \
-t "$IMAGE:python3.11-node20" \
--build-arg PYTHON_VERSION=3.11 \
--build-arg NODE_VERSION=20 \
.
echo ""
echo "2. Testing base image..."
docker run --rm "$IMAGE:latest" bash -c "python --version && node --version && bun --version"
echo ""
echo "3. Login to Harbor registry..."
docker login "$REGISTRY"
echo ""
echo "4. Pushing base image..."
docker push "$IMAGE:latest"
docker push "$IMAGE:python3.11-node20"
echo ""
echo "=== ✅ Base Image Built and Pushed Successfully! ==="
echo ""
echo "Base image is now available at:"
echo " - $IMAGE:latest"
echo " - $IMAGE:python3.11-node20"
echo ""
echo "You can now run the application pipeline."