feat: multiarch build
This commit is contained in:
34
Makefile
34
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: help build push up down logs ps restart clean nomad-start nomad-stop nomad-status nomad-ui nomad-job-run nomad-job-stop nomad-logs
|
||||
.PHONY: help build push up down logs ps restart clean nomad-start nomad-stop nomad-status nomad-ui nomad-job-run nomad-job-stop nomad-logs build-multiarch push-multiarch
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@@ -7,8 +7,10 @@ help:
|
||||
@echo "Targets:"
|
||||
@echo " make build - Build all Docker images"
|
||||
@echo " make push - Build and push all Docker images to Docker Hub"
|
||||
@echo " make build-multiarch - Build multiarch images (amd64 & arm64)"
|
||||
@echo " make push-multiarch - Build and push multiarch images (amd64 & arm64)"
|
||||
@echo " make up - Start all services"
|
||||
@echo " make down - Stop all services"
|
||||
@echo " make down - Stop all services"
|
||||
@echo " make logs - View logs from all services"
|
||||
@echo " make ps - Show service status"
|
||||
@echo " make restart - Restart all services"
|
||||
@@ -45,6 +47,34 @@ push:
|
||||
@cd ../spore-ui && make docker-build && make docker-push
|
||||
@echo "All images pushed successfully!"
|
||||
|
||||
# Build all images with multiarch support
|
||||
build-multiarch: IMAGE_TAG ?= latest
|
||||
build-multiarch:
|
||||
@echo "Building multiarch images for amd64 and arm64..."
|
||||
@echo "Building spore-gateway..."
|
||||
@cd ../spore-gateway && make docker-build-multiarch IMAGE_TAG=$(IMAGE_TAG)
|
||||
@echo "Building spore-registry..."
|
||||
@cd ../spore-registry && make docker-build-multiarch IMAGE_TAG=$(IMAGE_TAG)
|
||||
@echo "Building spore-ledlab..."
|
||||
@cd ../spore-ledlab && make docker-build-multiarch IMAGE_TAG=$(IMAGE_TAG)
|
||||
@echo "Building spore-ui..."
|
||||
@cd ../spore-ui && make docker-build-multiarch IMAGE_TAG=$(IMAGE_TAG)
|
||||
@echo "All multiarch images built successfully!"
|
||||
|
||||
# Build and push all images with multiarch support
|
||||
push-multiarch: IMAGE_TAG ?= latest
|
||||
push-multiarch:
|
||||
@echo "Building and pushing multiarch images to Docker Hub..."
|
||||
@echo "Building and pushing spore-gateway..."
|
||||
@cd ../spore-gateway && make docker-build-multiarch IMAGE_TAG=$(IMAGE_TAG)
|
||||
@echo "Building and pushing spore-registry..."
|
||||
@cd ../spore-registry && make docker-build-multiarch IMAGE_TAG=$(IMAGE_TAG)
|
||||
@echo "Building and pushing spore-ledlab..."
|
||||
@cd ../spore-ledlab && make docker-build-multiarch IMAGE_TAG=$(IMAGE_TAG)
|
||||
@echo "Building and pushing spore-ui..."
|
||||
@cd ../spore-ui && make docker-build-multiarch IMAGE_TAG=$(IMAGE_TAG)
|
||||
@echo "All multiarch images pushed successfully!"
|
||||
|
||||
# Start all services
|
||||
up:
|
||||
docker compose up -d
|
||||
|
||||
Reference in New Issue
Block a user