Skip to content

Commit

Permalink
Small Dockerfile refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Dec 10, 2024
1 parent c86df14 commit eccb2cf
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 46 deletions.
1 change: 0 additions & 1 deletion docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
*
!/crates
!/domains
!/orml
!/shared
!/test
!/Cargo.lock
Expand Down
11 changes: 2 additions & 9 deletions docker/bootstrap-node.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
11 changes: 2 additions & 9 deletions docker/farmer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 2 additions & 9 deletions docker/gateway.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
11 changes: 2 additions & 9 deletions docker/node.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 2 additions & 9 deletions docker/runtime.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit eccb2cf

Please sign in to comment.