diff --git a/plugins/wasm-go/Dockerfile b/plugins/wasm-go/Dockerfile index 2d19fc523..a309f63d9 100644 --- a/plugins/wasm-go/Dockerfile +++ b/plugins/wasm-go/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILDER=higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/wasm-go-builder:go1.19-tinygo0.27.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 ARG PLUGIN_NAME=hello-world diff --git a/plugins/wasm-go/Makefile b/plugins/wasm-go/Makefile index a8fc1b4e5..9d5c178f4 100644 --- a/plugins/wasm-go/Makefile +++ b/plugins/wasm-go/Makefile @@ -2,7 +2,8 @@ PLUGIN_NAME ?= hello-world REGISTRY ?= higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ GO_VERSION ?= 1.19 TINYGO_VERSION ?= 0.27.0 -BUILDER ?= ${REGISTRY}wasm-go-builder:go${GO_VERSION}-tinygo${TINYGO_VERSION} +ORAS_VERSION ?= 1.0.0 +BUILDER ?= ${REGISTRY}wasm-go-builder:go${GO_VERSION}-tinygo${TINYGO_VERSION}-oras${ORAS_VERSION} BUILD_TIME := $(shell date "+%Y%m%d-%H%M%S") COMMIT_ID := $(shell git rev-parse --short HEAD 2>/dev/null) IMG ?= ${REGISTRY}${PLUGIN_NAME}:${BUILD_TIME}-${COMMIT_ID} @@ -25,17 +26,17 @@ build-push: build # To build a wasm-go-builder image. # e.g. # REGISTRY= make builder -# If you want to use Go/TinyGo with another version, please modify GO_VERSION/TINYGO_VERSION. +# If you want to use Go/TinyGo/Oras with another version, please modify GO_VERSION/TINYGO_VERSION/ORAS_VERSION. # After your wasm-go-builder image is built, you can use it to build plugin image. # e.g. # PLUGIN_NAME=request-block BUILDER= make builder: - BUILDER=$(REGISTRY)wasm-go-builder:go$(GO_VERSION)-tinygo$(TINYGO_VERSION) docker buildx build --no-cache \ --platform linux/amd64,linux/arm64 \ --build-arg BASE_IMAGE=docker.io/ubuntu \ --build-arg GO_VERSION=$(GO_VERSION) \ --build-arg TINYGO_VERSION=$(TINYGO_VERSION) \ + --build-arg ORAS_VERSION=$(ORAS_VERSION) \ -f DockerfileBuilder \ -t ${BUILDER} \ --push \