update
This commit is contained in:
+19
-6
@@ -1,12 +1,25 @@
|
||||
# Build stage
|
||||
FROM golang:1.25-alpine AS builder
|
||||
# UI build stage
|
||||
FROM node:alpine AS ui-builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY otel-ui/ .
|
||||
|
||||
RUN npm install && npm run build
|
||||
|
||||
# Go build stage
|
||||
FROM golang:1.25-alpine AS go-builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
COPY cmd/ ./cmd
|
||||
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
|
||||
|
||||
@@ -17,9 +30,9 @@ RUN apk --no-cache add ca-certificates
|
||||
|
||||
WORKDIR /root/
|
||||
|
||||
COPY --from=builder /go-otel .
|
||||
COPY --from=builder /app/index.html .
|
||||
COPY --from=go-builder /go-otel .
|
||||
COPY --from=go-builder /app/otel-ui/dist ./dist
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["./go-otel"]
|
||||
CMD ["./go-otel"]
|
||||
|
||||
Reference in New Issue
Block a user