[core] Use npm for @devlikeapro/whatsapp-rust-bridge
This commit is contained in:
1 parent
0888640741
commit
f066f982bf
1 file changed
-17
-17
@@ -6,29 +6,12 @@ ARG GOLANG_IMAGE_TAG=1.24-bookworm
|
||||
#
|
||||
FROM node:${NODE_IMAGE_TAG} AS build
|
||||
ENV PUPPETEER_SKIP_DOWNLOAD=True
|
||||
ENV RUST_BUN_VERSION=1.3.9
|
||||
ENV RUSTUP_TOOLCHAIN=nightly-2026-01-30
|
||||
ENV RUST_WASM_PACK_VERSION=0.14.0
|
||||
ENV RUST_BUN_INSTALL=/root/.bun
|
||||
ENV PATH=${RUST_BUN_INSTALL}/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
# git + build toolchain for git deps
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends git python3 build-essential curl ca-certificates unzip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# bun + rust toolchains for whatsapp-rust-bridge prepare scripts
|
||||
RUN set -eux; \
|
||||
mkdir -p "${RUST_BUN_INSTALL}"; \
|
||||
curl -fsSL https://bun.sh/install | bash -s -- bun-v${RUST_BUN_VERSION}; \
|
||||
curl -fsSL https://sh.rustup.rs | bash -s -- -y --default-toolchain ${RUSTUP_TOOLCHAIN}; \
|
||||
/root/.cargo/bin/rustup target add wasm32-unknown-unknown; \
|
||||
/root/.cargo/bin/cargo install wasm-pack --vers ${RUST_WASM_PACK_VERSION} --locked; \
|
||||
"${RUST_BUN_INSTALL}/bin/bun" --version; \
|
||||
/root/.cargo/bin/cargo --version; \
|
||||
/root/.cargo/bin/rustc --version; \
|
||||
/root/.cargo/bin/wasm-pack --version
|
||||
|
||||
# npm packages
|
||||
WORKDIR /git
|
||||
COPY package.json .
|
||||
|
||||
Reference in new issue
Block a user