biohazard-vfx/scripts/build-and-push.sh
Nicholai 0d1f6012ec
Some checks are pending
Build and Push to Docker Hub / Push Docker image to Docker Hub (push) Waiting to run
Build and Push Docker Image / build-and-push (push) Waiting to run
delinted and successfully builds
2025-08-16 06:37:34 -06:00

29 lines
599 B
Bash
Executable File

#!/bin/bash
# Script to build and push Docker image
# Usage: ./scripts/build-and-push.sh [registry] [tag]
set -e
REGISTRY=${1:-docker.io}
USERNAME=${2:-biohazardvfx}
IMAGE_NAME=${3:-website}
TAG=${4:-latest}
# Full image name
IMAGE="$REGISTRY/$USERNAME/$IMAGE_NAME:$TAG"
echo "Building Docker image: $IMAGE"
# Build the image
docker build -t "$IMAGE" .
echo "Image built successfully!"
# Optional: Push to registry (uncomment if needed)
# echo "Pushing image to registry..."
# docker push "$IMAGE"
# echo "Image pushed successfully!"
echo "To push the image, run:"
echo "docker push $IMAGE"