This commit is contained in:
2026-04-03 11:19:00 +02:00
parent 2416f528bb
commit 26265e776c
14 changed files with 533 additions and 11 deletions
+4 -2
View File
@@ -1,4 +1,6 @@
# UI build stage
ARG TARGETOS
ARG TARGETARCH
FROM node:alpine AS ui-builder
WORKDIR /app
@@ -8,7 +10,7 @@ COPY otel-ui/ .
RUN npm install && npm run build
# Go build stage
FROM golang:1.25-alpine AS go-builder
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS go-builder
WORKDIR /app
@@ -21,7 +23,7 @@ COPY internal/ ./internal
# Copy built UI dist
COPY --from=ui-builder /app/dist ./otel-ui/dist
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o /go-otel ./cmd/server
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -installsuffix cgo -o /go-otel ./cmd/server
# Final stage
FROM alpine:latest