mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-22 19:49:22 +00:00
Correct Dockerfile caching
This commit is contained in:
parent
79943c3a6c
commit
818215b570
3 changed files with 15 additions and 16 deletions
|
@ -19,7 +19,9 @@ WORKDIR /serai
|
|||
RUN apt update && apt install -y clang
|
||||
|
||||
# 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/git \
|
||||
--mount=type=cache,target=/serai/target \
|
||||
cd message-queue && \
|
||||
cargo build --release --all-features && \
|
||||
|
|
|
@ -17,7 +17,9 @@ ADD AGPL-3.0 /serai
|
|||
WORKDIR /serai
|
||||
|
||||
# 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/git \
|
||||
--mount=type=cache,target=/serai/target \
|
||||
cd processor && \
|
||||
cargo build --release --all-features && \
|
||||
|
|
|
@ -20,31 +20,26 @@ WORKDIR /serai
|
|||
RUN rustup update
|
||||
|
||||
# Install Solc @ 0.8.16
|
||||
RUN --mount=type=cache,target=/root/.cache/ \
|
||||
--mount=type=cache,target=/root/.local/ \
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=cache,target=/root/.local \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
pip3 install solc-select==0.2.1
|
||||
RUN --mount=type=cache,target=/root/.cache/ \
|
||||
--mount=type=cache,target=/root/.local/ \
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=cache,target=/root/.local \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
solc-select install 0.8.16
|
||||
RUN --mount=type=cache,target=/root/.cache/ \
|
||||
--mount=type=cache,target=/root/.local/ \
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=cache,target=/root/.local \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
solc-select use 0.8.16
|
||||
|
||||
# Mount cargo and the Serai cache
|
||||
RUN --mount=type=cache,target=/root/.local/ \
|
||||
RUN --mount=type=cache,target=/root/.local \
|
||||
--mount=type=cache,target=/root/.solc-select \
|
||||
--mount=type=cache,target=/root/.cache/ \
|
||||
--mount=type=cache,target=/root/.cache \
|
||||
--mount=type=cache,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/serai/target/release/build \
|
||||
--mount=type=cache,target=/serai/target/release/deps \
|
||||
--mount=type=cache,target=/serai/target/release/.fingerprint \
|
||||
--mount=type=cache,target=/serai/target/release/incremental \
|
||||
--mount=type=cache,target=/serai/target/release/wbuild \
|
||||
--mount=type=cache,target=/serai/target/release/lib* \
|
||||
--mount=type=cache,target=/serai/target \
|
||||
cd substrate/node && cargo build --release
|
||||
|
||||
# Prepare Image
|
||||
|
|
Loading…
Reference in a new issue