diff --git a/plugins/wasm-rust/Dockerfile b/plugins/wasm-rust/Dockerfile index df55a5ad1..1dce74bff 100644 --- a/plugins/wasm-rust/Dockerfile +++ b/plugins/wasm-rust/Dockerfile @@ -1,11 +1,12 @@ FROM rust:1.80 as builder WORKDIR /workspace -RUN apt update && apt-get install gcc gcc-multilib llvm clang -y && apt clean RUN rustup target add wasm32-wasi ARG PLUGIN_NAME="say-hello" ARG BUILD_OPTS="--release" +ARG BUILDRC=".buildrc" COPY . . WORKDIR /workspace/extensions/$PLUGIN_NAME +RUN if [ -f $BUILDRC ]; then sh $BUILDRC; fi RUN cargo build --target wasm32-wasi $BUILD_OPTS \ && cp target/wasm32-wasi/release/*.wasm /main.wasm diff --git a/plugins/wasm-rust/DockerfileBuilder b/plugins/wasm-rust/DockerfileBuilder index 3f9879af3..d05add1f2 100644 --- a/plugins/wasm-rust/DockerfileBuilder +++ b/plugins/wasm-rust/DockerfileBuilder @@ -8,10 +8,7 @@ FROM $BASE_IMAGE LABEL rust_version=$RUST_VERSION oras_version=$ORAS_VERSION -RUN apt-get update \ - && apt-get install -y wget gcc gcc-multilib llvm clang \ - && rustup target add wasm32-wasi \ - && rm -rf /var/lib/apt/lists/* +RUN rustup target add wasm32-wasi RUN arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ rust_version=${RUST_VERSION:-1.82}; \ diff --git a/plugins/wasm-rust/extensions/ai-data-masking/.buildrc b/plugins/wasm-rust/extensions/ai-data-masking/.buildrc new file mode 100644 index 000000000..bd317b860 --- /dev/null +++ b/plugins/wasm-rust/extensions/ai-data-masking/.buildrc @@ -0,0 +1 @@ +apt update && apt-get install gcc gcc-multilib llvm clang -y && apt clean \ No newline at end of file