mirror of
https://github.com/alibaba/higress.git
synced 2026-03-07 10:00:48 +08:00
20 lines
362 B
Docker
20 lines
362 B
Docker
FROM golang:1.23 AS golang-base
|
|
|
|
ARG GOPROXY
|
|
ARG GO_FILTER_NAME
|
|
|
|
ENV GOFLAGS=-buildvcs=false
|
|
ENV GOPROXY=${GOPROXY}
|
|
|
|
WORKDIR /workspace
|
|
|
|
COPY . .
|
|
|
|
WORKDIR /workspace/$GO_FILTER_NAME
|
|
|
|
RUN go mod tidy
|
|
RUN go build -o /$GO_FILTER_NAME.so -buildmode=c-shared .
|
|
|
|
FROM scratch AS output
|
|
ARG GO_FILTER_NAME
|
|
COPY --from=golang-base /$GO_FILTER_NAME.so $GO_FILTER_NAME.so |