better
This commit is contained in:
+4
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user