# Docker Bake file for KidsAI Explorer # This enables better build performance when using COMPOSE_BAKE=true # Use with: docker buildx bake or docker compose --file docker-compose.yml build variable "REGISTRY" { default = "kidsai-explorer" } variable "TAG" { default = "latest" } # Base target with common configuration target "base" { context = "." dockerfile = "Dockerfile" platforms = ["linux/amd64", "linux/arm64"] labels = { "org.opencontainers.image.title" = "KidsAI Explorer" "org.opencontainers.image.description" = "A kid-friendly AI frontend that encourages critical thinking" "org.opencontainers.image.version" = "2.0.0" "org.opencontainers.image.created" = "${timestamp()}" } } # Development target target "development" { inherits = ["base"] target = "development" tags = ["${REGISTRY}:dev", "${REGISTRY}:development"] cache-from = ["type=gha"] cache-to = ["type=gha,mode=max"] } # Production target target "production" { inherits = ["base"] target = "production" tags = ["${REGISTRY}:prod", "${REGISTRY}:production", "${REGISTRY}:${TAG}"] cache-from = ["type=gha"] cache-to = ["type=gha,mode=max"] } # Default target target "default" { inherits = ["production"] } # Group for building all targets group "all" { targets = ["development", "production"] } # Group for CI/CD group "ci" { targets = ["production"] }