add cross platform compile
This commit is contained in:
parent
a521a49162
commit
99596679d1
2 changed files with 10 additions and 4 deletions
|
|
@ -1,7 +1,10 @@
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Stage 1: Build the picoclaw binary
|
# Stage 1: Build the picoclaw binary
|
||||||
# ============================================================
|
# ============================================================
|
||||||
FROM golang:1.25-alpine AS builder
|
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS builder
|
||||||
|
|
||||||
|
ARG TARGETOS
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
RUN apk add --no-cache git make
|
RUN apk add --no-cache git make
|
||||||
|
|
||||||
|
|
@ -13,7 +16,7 @@ RUN go mod download
|
||||||
|
|
||||||
# Copy source and build
|
# Copy source and build
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN make build
|
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build PLATFORM=$TARGETOS ARCH=$TARGETARCH
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Stage 2: Minimal runtime image
|
# Stage 2: Minimal runtime image
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Stage 1: Build the picoclaw binary
|
# Stage 1: Build the picoclaw binary
|
||||||
# ============================================================
|
# ============================================================
|
||||||
FROM golang:1.26.0-alpine AS builder
|
FROM --platform=$BUILDPLATFORM golang:1.26.0-alpine AS builder
|
||||||
|
|
||||||
|
ARG TARGETOS
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
RUN apk add --no-cache git make
|
RUN apk add --no-cache git make
|
||||||
|
|
||||||
|
|
@ -13,7 +16,7 @@ RUN go mod download
|
||||||
|
|
||||||
# Copy source and build
|
# Copy source and build
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN make build
|
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build PLATFORM=$TARGETOS ARCH=$TARGETARCH
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Stage 2: Node.js-based runtime with full MCP support
|
# Stage 2: Node.js-based runtime with full MCP support
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue