From b6e97d04ec7a0f356f7b7f86bf08e517260a08e9 Mon Sep 17 00:00:00 2001 From: sushi30 Date: Thu, 26 Mar 2026 08:47:02 +0100 Subject: [PATCH] feat(docker): support BUILD_TARGET arg and add build-whatsapp-native-docker target --- Makefile | 6 ++++++ docker/Dockerfile | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f7ebc7411..68dea59a8 100644 --- a/Makefile +++ b/Makefile @@ -165,6 +165,12 @@ build-launcher-tui: @ln -sf picoclaw-launcher-tui-$(PLATFORM)-$(ARCH) $(BUILD_DIR)/picoclaw-launcher-tui @echo "Build complete: $(BUILD_DIR)/picoclaw-launcher-tui" +## build-whatsapp-native-docker: Build with WhatsApp native for linux/amd64 only (Docker image use) +build-whatsapp-native-docker: generate + @mkdir -p $(BUILD_DIR) + GOOS=linux GOARCH=amd64 $(GO) build -buildvcs=false -tags $(GO_BUILD_TAGS),whatsapp_native -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME) ./$(CMD_DIR) + @echo "Build complete: $(BUILD_DIR)/$(BINARY_NAME)" + ## build-whatsapp-native: Build with WhatsApp native (whatsmeow) support; larger binary build-whatsapp-native: generate ## @echo "Building $(BINARY_NAME) with WhatsApp native for $(PLATFORM)/$(ARCH)..." diff --git a/docker/Dockerfile b/docker/Dockerfile index f36a98ff6..41cc69348 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,7 +13,8 @@ RUN go mod download # Copy source and build COPY . . -RUN make build +ARG BUILD_TARGET=build +RUN make ${BUILD_TARGET} # ============================================================ # Stage 2: Minimal runtime image