mirror of
https://github.com/alibaba/higress.git
synced 2026-02-21 22:40:59 +08:00
22 lines
431 B
Docker
22 lines
431 B
Docker
ARG BUILDER=higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/wasm-go-builder:go1.19-tinygo0.25.0-oras1.0.0
|
|
FROM $BUILDER as builder
|
|
|
|
|
|
ARG GOPROXY
|
|
ENV GOPROXY=${GOPROXY}
|
|
|
|
ARG PLUGIN_NAME=hello-world
|
|
|
|
WORKDIR /workspace
|
|
|
|
COPY . .
|
|
|
|
WORKDIR /workspace/extensions/$PLUGIN_NAME
|
|
|
|
RUN go mod tidy
|
|
RUN tinygo build -o /main.wasm -scheduler=none -target=wasi ./main.go
|
|
|
|
FROM scratch as output
|
|
|
|
COPY --from=builder /main.wasm plugin.wasm
|