
Some checks failed
build-and-push-ext / build_push (push) Failing after 3m57s
- Changement de wasm-pack 0.11.0 vers 0.10.3 dans Dockerfile et workflow CI - wasm-pack 0.11.0 a des dépendances transitives nécessitant edition2024 - wasm-pack 0.10.3 est compatible avec Rust 1.82.0 et wasm-bindgen 0.2.103 - Résolution de l'erreur 'feature edition2024 is required' dans les dépendances - Test local réussi : build WebAssembly, build TypeScript et tests passent - La CI et Docker peuvent maintenant compiler WebAssembly sans erreur
48 lines
1.0 KiB
Docker
48 lines
1.0 KiB
Docker
# syntax=docker/dockerfile:1.4
|
|
FROM rust:1.82-alpine AS wasm-builder
|
|
WORKDIR /build
|
|
|
|
# Installation des dépendances nécessaires pour la compilation
|
|
RUN apk update && apk add --no-cache \
|
|
git \
|
|
curl \
|
|
nodejs \
|
|
npm \
|
|
build-base \
|
|
pkgconfig \
|
|
clang \
|
|
llvm \
|
|
musl-dev
|
|
|
|
# Installation de wasm-pack et wasm-bindgen
|
|
RUN cargo install wasm-pack --version 0.10.3
|
|
RUN cargo install wasm-bindgen-cli --version 0.2.103
|
|
|
|
# Copie du projet sdk_signer
|
|
COPY . sdk_signer/
|
|
|
|
# Clonage du sdk_client au même niveau que sdk_signer
|
|
RUN git clone -b dev https://git.4nkweb.com/4nk/sdk_client.git
|
|
|
|
# Build du WebAssembly
|
|
WORKDIR /build/sdk_client
|
|
RUN wasm-pack build --out-dir ../sdk_signer/pkg --target nodejs --dev
|
|
|
|
FROM node:20-alpine
|
|
WORKDIR /app
|
|
|
|
# Installation des dépendances nécessaires
|
|
RUN apk update && apk add --no-cache git
|
|
|
|
# Copie des fichiers du projet
|
|
COPY --from=wasm-builder /build/sdk_signer/pkg ./pkg
|
|
COPY . .
|
|
|
|
# Installation des dépendances Node.js
|
|
RUN npm install
|
|
|
|
RUN npm run build
|
|
|
|
EXPOSE 9090
|
|
|
|
CMD ["npm", "start"] |