enhance(make): improve Docker commands and add networking workarounds
- Add docker-build-legacy for legacy builder support - Add docker-dev-host and docker-prod-host for host networking - Remove complex commands for unused services - Add docker-reset for networking troubleshooting - Simplify Docker workflow for core functionality - Better error handling and documentation
This commit is contained in:
44
Makefile
44
Makefile
@@ -222,23 +222,57 @@ docker-build: ## Build Docker images
|
||||
docker-compose build
|
||||
$(call success,Docker images built)
|
||||
|
||||
docker-build-legacy: ## Build Docker images with legacy builder (networking issues workaround)
|
||||
$(call info,Building Docker images with legacy builder...)
|
||||
DOCKER_BUILDKIT=0 docker-compose build
|
||||
$(call success,Docker images built with legacy builder)
|
||||
|
||||
docker-dev: ## Start development environment with Docker
|
||||
$(call info,Starting development environment with Docker...)
|
||||
docker-compose up unitforge-dev
|
||||
|
||||
docker-dev-host: ## Start development environment with host networking (networking issues workaround)
|
||||
$(call info,Starting development environment with host networking...)
|
||||
docker-compose -f docker-compose.yml -f docker-compose.host-network.yml up unitforge-dev
|
||||
|
||||
|
||||
|
||||
docker-prod: ## Start production environment with Docker
|
||||
$(call info,Starting production environment with Docker...)
|
||||
docker-compose --profile production up
|
||||
docker-compose up unitforge-prod
|
||||
|
||||
docker-prod-host: ## Start production environment with host networking (networking issues workaround)
|
||||
$(call info,Starting production environment with host networking...)
|
||||
docker-compose -f docker-compose.yml -f docker-compose.host-network.yml up unitforge-prod
|
||||
|
||||
|
||||
docker-test: ## Run tests in Docker
|
||||
$(call info,Running tests in Docker...)
|
||||
docker-compose --profile test up unitforge-test
|
||||
|
||||
docker-cli: ## Run CLI in Docker
|
||||
$(call info,Running CLI in Docker...)
|
||||
docker-compose --profile cli run --rm unitforge-cli --help
|
||||
|
||||
docker-clean: ## Clean Docker containers and images
|
||||
docker-logs: ## Show logs from all Docker services
|
||||
$(call info,Showing Docker logs...)
|
||||
docker-compose logs -f
|
||||
|
||||
docker-shell: ## Open shell in development container
|
||||
$(call info,Opening shell in development container...)
|
||||
docker-compose exec unitforge-dev /bin/bash
|
||||
|
||||
docker-clean: ## Clean up Docker containers and volumes
|
||||
$(call info,Cleaning up Docker resources...)
|
||||
docker-compose down --remove-orphans --volumes
|
||||
docker system prune -f
|
||||
$(call success,Docker cleanup completed)
|
||||
|
||||
docker-reset: ## Reset Docker networking (fix networking issues)
|
||||
$(call info,Resetting Docker networking...)
|
||||
docker network prune -f
|
||||
docker system prune -f
|
||||
sudo systemctl restart docker || echo "Could not restart Docker daemon (requires sudo)"
|
||||
$(call success,Docker networking reset completed)
|
||||
|
||||
docker-clean-legacy: ## Clean Docker containers and images
|
||||
$(call info,Cleaning Docker containers and images...)
|
||||
docker-compose down --volumes --remove-orphans
|
||||
docker system prune -f
|
||||
|
||||
Reference in New Issue
Block a user