mirror of
https://github.com/alibaba/higress.git
synced 2026-04-21 20:17:29 +08:00
release 2.1.0 rc.2 (#1995)
This commit is contained in:
@@ -1,29 +1,12 @@
|
||||
# Build stage
|
||||
FROM golang:1.24 AS builder
|
||||
|
||||
ARG SERVER_NAME=quark-search
|
||||
ARG GOPROXY
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the server code
|
||||
COPY ${SERVER_NAME}/ .
|
||||
|
||||
# Set GOPROXY if provided
|
||||
RUN if [ -n "$GOPROXY" ]; then go env -w GOPROXY=${GOPROXY}; fi
|
||||
|
||||
# Build the WASM binary
|
||||
RUN GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o main.wasm main.go
|
||||
|
||||
# Final stage
|
||||
# Single stage build using pre-built WASM binary
|
||||
FROM scratch
|
||||
|
||||
ARG SERVER_NAME=quark-search
|
||||
|
||||
WORKDIR /
|
||||
|
||||
# Copy the WASM binary from the builder stage
|
||||
COPY --from=builder /app/main.wasm /main.wasm
|
||||
# Copy the pre-built WASM binary from local build
|
||||
COPY ${SERVER_NAME}/main.wasm /plugin.wasm
|
||||
|
||||
# Metadata
|
||||
LABEL org.opencontainers.image.title="${SERVER_NAME}"
|
||||
|
||||
Reference in New Issue
Block a user