mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 20:57:32 +08:00
Add environment variable goproxy (#313)
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
ARG BUILDER=higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/wasm-go-builder:go1.19-tinygo0.27.0-oras1.0.0
|
ARG BUILDER=higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/wasm-go-builder:go1.19-tinygo0.27.0-oras1.0.0
|
||||||
FROM $BUILDER as builder
|
FROM $BUILDER as builder
|
||||||
|
|
||||||
|
|
||||||
|
ARG GOPROXY
|
||||||
|
ENV GOPROXY=${GOPROXY}
|
||||||
|
|
||||||
ARG PLUGIN_NAME=hello-world
|
ARG PLUGIN_NAME=hello-world
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|||||||
@@ -7,11 +7,13 @@ BUILDER ?= ${REGISTRY}wasm-go-builder:go${GO_VERSION}-tinygo${TINYGO_VERSION}-or
|
|||||||
BUILD_TIME := $(shell date "+%Y%m%d-%H%M%S")
|
BUILD_TIME := $(shell date "+%Y%m%d-%H%M%S")
|
||||||
COMMIT_ID := $(shell git rev-parse --short HEAD 2>/dev/null)
|
COMMIT_ID := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||||
IMG ?= ${REGISTRY}${PLUGIN_NAME}:${BUILD_TIME}-${COMMIT_ID}
|
IMG ?= ${REGISTRY}${PLUGIN_NAME}:${BUILD_TIME}-${COMMIT_ID}
|
||||||
|
GOPROXY := $(shell go env GOPROXY)
|
||||||
|
|
||||||
.DEFAULT:
|
.DEFAULT:
|
||||||
build:
|
build:
|
||||||
DOCKER_BUILDKIT=1 docker build --build-arg PLUGIN_NAME=${PLUGIN_NAME} \
|
DOCKER_BUILDKIT=1 docker build --build-arg PLUGIN_NAME=${PLUGIN_NAME} \
|
||||||
--build-arg BUILDER=${BUILDER} \
|
--build-arg BUILDER=${BUILDER} \
|
||||||
|
--build-arg GOPROXY=$(GOPROXY) \
|
||||||
-t ${IMG} \
|
-t ${IMG} \
|
||||||
--output extensions/${PLUGIN_NAME} \
|
--output extensions/${PLUGIN_NAME} \
|
||||||
.
|
.
|
||||||
|
|||||||
Reference in New Issue
Block a user