mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Install wasm toolchain before ADDing files to docker images
Enables caching the wasm toolchain.
This commit is contained in:
@@ -11,6 +11,9 @@ RUN apt install -y pkg-config clang
|
|||||||
# Dependencies for the Serai node
|
# Dependencies for the Serai node
|
||||||
RUN apt install -y make protobuf-compiler
|
RUN apt install -y make protobuf-compiler
|
||||||
|
|
||||||
|
# Add the wasm toolchain
|
||||||
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
# Add files for build
|
# Add files for build
|
||||||
ADD common /serai/common
|
ADD common /serai/common
|
||||||
ADD crypto /serai/crypto
|
ADD crypto /serai/crypto
|
||||||
@@ -27,9 +30,6 @@ ADD AGPL-3.0 /serai
|
|||||||
|
|
||||||
WORKDIR /serai
|
WORKDIR /serai
|
||||||
|
|
||||||
# Add the wasm toolchain
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
|
||||||
|
|
||||||
# Mount the caches and build
|
# Mount the caches and build
|
||||||
RUN --mount=type=cache,target=/root/.cargo \
|
RUN --mount=type=cache,target=/root/.cargo \
|
||||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ RUN apt install -y pkg-config clang
|
|||||||
# Dependencies for the Serai node
|
# Dependencies for the Serai node
|
||||||
RUN apt install -y make protobuf-compiler
|
RUN apt install -y make protobuf-compiler
|
||||||
|
|
||||||
|
# Add the wasm toolchain
|
||||||
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
# Add files for build
|
# Add files for build
|
||||||
ADD common /serai/common
|
ADD common /serai/common
|
||||||
ADD crypto /serai/crypto
|
ADD crypto /serai/crypto
|
||||||
@@ -37,9 +40,6 @@ ADD AGPL-3.0 /serai
|
|||||||
|
|
||||||
WORKDIR /serai
|
WORKDIR /serai
|
||||||
|
|
||||||
# Add the wasm toolchain
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
|
||||||
|
|
||||||
# Mount the caches and build
|
# Mount the caches and build
|
||||||
RUN --mount=type=cache,target=/root/.cargo \
|
RUN --mount=type=cache,target=/root/.cargo \
|
||||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ RUN apt install -y pkg-config clang
|
|||||||
# Dependencies for the Serai node
|
# Dependencies for the Serai node
|
||||||
RUN apt install -y make protobuf-compiler
|
RUN apt install -y make protobuf-compiler
|
||||||
|
|
||||||
|
# Add the wasm toolchain
|
||||||
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
# Add files for build
|
# Add files for build
|
||||||
ADD common /serai/common
|
ADD common /serai/common
|
||||||
ADD crypto /serai/crypto
|
ADD crypto /serai/crypto
|
||||||
@@ -37,9 +40,6 @@ ADD AGPL-3.0 /serai
|
|||||||
|
|
||||||
WORKDIR /serai
|
WORKDIR /serai
|
||||||
|
|
||||||
# Add the wasm toolchain
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
|
||||||
|
|
||||||
# Mount the caches and build
|
# Mount the caches and build
|
||||||
RUN --mount=type=cache,target=/root/.cargo \
|
RUN --mount=type=cache,target=/root/.cargo \
|
||||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ RUN apt install -y pkg-config clang
|
|||||||
# Dependencies for the Serai node
|
# Dependencies for the Serai node
|
||||||
RUN apt install -y make protobuf-compiler
|
RUN apt install -y make protobuf-compiler
|
||||||
|
|
||||||
|
# Add the wasm toolchain
|
||||||
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
# Add files for build
|
# Add files for build
|
||||||
ADD common /serai/common
|
ADD common /serai/common
|
||||||
ADD crypto /serai/crypto
|
ADD crypto /serai/crypto
|
||||||
@@ -37,9 +40,6 @@ ADD AGPL-3.0 /serai
|
|||||||
|
|
||||||
WORKDIR /serai
|
WORKDIR /serai
|
||||||
|
|
||||||
# Add the wasm toolchain
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
|
||||||
|
|
||||||
# Mount the caches and build
|
# Mount the caches and build
|
||||||
RUN --mount=type=cache,target=/root/.cargo \
|
RUN --mount=type=cache,target=/root/.cargo \
|
||||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ RUN apt install -y pkg-config clang
|
|||||||
# Dependencies for the Serai node
|
# Dependencies for the Serai node
|
||||||
RUN apt install -y make protobuf-compiler
|
RUN apt install -y make protobuf-compiler
|
||||||
|
|
||||||
|
# Add the wasm toolchain
|
||||||
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
# Add files for build
|
# Add files for build
|
||||||
ADD common /serai/common
|
ADD common /serai/common
|
||||||
ADD crypto /serai/crypto
|
ADD crypto /serai/crypto
|
||||||
@@ -37,9 +40,6 @@ ADD AGPL-3.0 /serai
|
|||||||
|
|
||||||
WORKDIR /serai
|
WORKDIR /serai
|
||||||
|
|
||||||
# Add the wasm toolchain
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
|
||||||
|
|
||||||
# Mount the caches and build
|
# Mount the caches and build
|
||||||
RUN --mount=type=cache,target=/root/.cargo \
|
RUN --mount=type=cache,target=/root/.cargo \
|
||||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ RUN apt install -y pkg-config clang
|
|||||||
# Dependencies for the Serai node
|
# Dependencies for the Serai node
|
||||||
RUN apt install -y make protobuf-compiler
|
RUN apt install -y make protobuf-compiler
|
||||||
|
|
||||||
|
# Add the wasm toolchain
|
||||||
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
# Add files for build
|
# Add files for build
|
||||||
ADD common /serai/common
|
ADD common /serai/common
|
||||||
ADD crypto /serai/crypto
|
ADD crypto /serai/crypto
|
||||||
@@ -37,9 +40,6 @@ ADD AGPL-3.0 /serai
|
|||||||
|
|
||||||
WORKDIR /serai
|
WORKDIR /serai
|
||||||
|
|
||||||
# Add the wasm toolchain
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
|
||||||
|
|
||||||
# Mount the caches and build
|
# Mount the caches and build
|
||||||
RUN --mount=type=cache,target=/root/.cargo \
|
RUN --mount=type=cache,target=/root/.cargo \
|
||||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
|
|||||||
Reference in New Issue
Block a user