diff --git a/docker/.dockerignore b/docker/.dockerignore index 983f1aefff..8c1b3a993a 100644 --- a/docker/.dockerignore +++ b/docker/.dockerignore @@ -1,7 +1,6 @@ * !/crates !/domains -!/orml !/shared !/test !/Cargo.lock diff --git a/docker/bootstrap-node.Dockerfile b/docker/bootstrap-node.Dockerfile index 3ff6bb7caf..331a8f9420 100644 --- a/docker/bootstrap-node.Dockerfile +++ b/docker/bootstrap-node.Dockerfile @@ -55,17 +55,10 @@ RUN \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \ /root/.cargo/bin/rustup target add wasm32-unknown-unknown -COPY Cargo.lock /code/Cargo.lock -COPY Cargo.toml /code/Cargo.toml -COPY rust-toolchain.toml /code/rust-toolchain.toml - -COPY crates /code/crates -COPY domains /code/domains -COPY shared /code/shared -COPY test /code/test - # Up until this line all Rust images in this repo should be the same to share the same layers +COPY . /code + ARG TARGETVARIANT RUN \ diff --git a/docker/farmer.Dockerfile b/docker/farmer.Dockerfile index 7c637abfaa..0c88b2e6b8 100644 --- a/docker/farmer.Dockerfile +++ b/docker/farmer.Dockerfile @@ -55,15 +55,6 @@ RUN \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \ /root/.cargo/bin/rustup target add wasm32-unknown-unknown -COPY Cargo.lock /code/Cargo.lock -COPY Cargo.toml /code/Cargo.toml -COPY rust-toolchain.toml /code/rust-toolchain.toml - -COPY crates /code/crates -COPY domains /code/domains -COPY shared /code/shared -COPY test /code/test - # Up until this line all Rust images in this repo should be the same to share the same layers # CUDA toolchain, including support for cross-compilation from x86-64 to aarch64, but NOT from aarch64 to x86-64 @@ -104,6 +95,8 @@ RUN \ ldconfig \ ; fi +COPY . /code + ARG TARGETVARIANT # ROCm is only used on x86-64 since they don't have other packages diff --git a/docker/gateway.Dockerfile b/docker/gateway.Dockerfile index 85f4c62f1c..f9a24df5fe 100644 --- a/docker/gateway.Dockerfile +++ b/docker/gateway.Dockerfile @@ -55,17 +55,10 @@ RUN \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \ /root/.cargo/bin/rustup target add wasm32-unknown-unknown -COPY Cargo.lock /code/Cargo.lock -COPY Cargo.toml /code/Cargo.toml -COPY rust-toolchain.toml /code/rust-toolchain.toml - -COPY crates /code/crates -COPY domains /code/domains -COPY shared /code/shared -COPY test /code/test - # Up until this line all Rust images in this repo should be the same to share the same layers +COPY . /code + ARG TARGETVARIANT RUN \ diff --git a/docker/node.Dockerfile b/docker/node.Dockerfile index 1342f9a3bc..395ebf0989 100644 --- a/docker/node.Dockerfile +++ b/docker/node.Dockerfile @@ -55,17 +55,10 @@ RUN \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \ /root/.cargo/bin/rustup target add wasm32-unknown-unknown -COPY Cargo.lock /code/Cargo.lock -COPY Cargo.toml /code/Cargo.toml -COPY rust-toolchain.toml /code/rust-toolchain.toml - -COPY crates /code/crates -COPY domains /code/domains -COPY shared /code/shared -COPY test /code/test - # Up until this line all Rust images in this repo should be the same to share the same layers +COPY . /code + ARG SUBSTRATE_CLI_GIT_COMMIT_HASH ARG TARGETVARIANT diff --git a/docker/runtime.Dockerfile b/docker/runtime.Dockerfile index cdd02c4d44..7c56113a29 100644 --- a/docker/runtime.Dockerfile +++ b/docker/runtime.Dockerfile @@ -55,17 +55,10 @@ RUN \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \ /root/.cargo/bin/rustup target add wasm32-unknown-unknown -COPY Cargo.lock /code/Cargo.lock -COPY Cargo.toml /code/Cargo.toml -COPY rust-toolchain.toml /code/rust-toolchain.toml - -COPY crates /code/crates -COPY domains /code/domains -COPY shared /code/shared -COPY test /code/test - # Up until this line all Rust images in this repo should be the same to share the same layers +COPY . /code + ARG TARGETVARIANT RUN \