feat(docker): support BUILD_TARGET arg and add build-whatsapp-native-docker target

This commit is contained in:
sushi30 2026-03-26 08:47:02 +01:00 committed by github-actions[bot]
parent 2431b9987b
commit b6e97d04ec
2 changed files with 8 additions and 1 deletions

View file

@ -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)..."

View file

@ -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