diff --git a/build-and-push-test.sh b/build-and-push-test.sh index cb93f7e..299d36b 100755 --- a/build-and-push-test.sh +++ b/build-and-push-test.sh @@ -23,9 +23,7 @@ echo "๐Ÿ” Checking if Docker is running..." $DOCKER_PATH ps > /dev/null 2>&1 || { echo "โŒ Docker is not running. Please start Docker and try again."; exit 1; } echo "โœ… Docker is running!" -# Prune builder cache to free up space -echo "๐Ÿงน Pruning Docker builder cache..." -$DOCKER_PATH builder prune --all --force + # Function to build backend for a specific platform build_backend() { @@ -35,7 +33,7 @@ build_backend() { echo "๐Ÿ—๏ธ Building backend for $platform..." # Run build from root context to allow copying frontend files # Use -f backend/Dockerfile to specify the Dockerfile path - $DOCKER_PATH build --no-cache --platform $platform -f backend/Dockerfile -t $tag . + $DOCKER_PATH build --platform $platform -f backend/Dockerfile -t $tag . echo "๐Ÿš€ Pushing backend image: $tag" $DOCKER_PATH push $tag @@ -51,7 +49,7 @@ build_frontend() { echo "๐Ÿ—๏ธ Building frontend for $platform..." cd frontend - $DOCKER_PATH build --no-cache --platform $platform \ + $DOCKER_PATH build --platform $platform \ --build-arg VITE_API_URL="$VITE_API_URL" \ --build-arg VITE_BACKEND_URL="$VITE_BACKEND_URL" \ -t $tag . diff --git a/build-and-push.sh b/build-and-push.sh index 25748bf..9cf5cf4 100755 --- a/build-and-push.sh +++ b/build-and-push.sh @@ -31,9 +31,7 @@ echo "๐Ÿ” Checking if Docker is running..." $DOCKER_PATH ps > /dev/null 2>&1 || { echo "โŒ Docker is not running. Please start Docker and try again."; exit 1; } echo "โœ… Docker is running!" -# Prune builder cache to free up space -echo "๐Ÿงน Pruning Docker builder cache..." -$DOCKER_PATH builder prune --all --force + # Function to build backend for a specific platform build_backend() { @@ -44,7 +42,7 @@ build_backend() { echo "๐Ÿ—๏ธ Building backend for $platform..." # Run build from root context to allow copying frontend files # Use -f backend/Dockerfile to specify the Dockerfile path - $DOCKER_PATH build --no-cache --platform $platform -f backend/Dockerfile -t $tag . + $DOCKER_PATH build --platform $platform -f backend/Dockerfile -t $tag . if [ -n "$VERSION" ] && [ -n "$version_tag" ]; then $DOCKER_PATH tag $tag $version_tag @@ -73,7 +71,7 @@ build_frontend() { echo "๐Ÿ—๏ธ Building frontend for $platform..." cd frontend - $DOCKER_PATH build --no-cache --platform $platform \ + $DOCKER_PATH build --platform $platform \ --build-arg VITE_API_URL="$VITE_API_URL" \ --build-arg VITE_BACKEND_URL="$VITE_BACKEND_URL" \ -t $tag .