This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
forked from paritytech/substrate
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request paritytech#66 from subspace/working-build-run-inst…
…ructions Working build run instructions
- Loading branch information
Showing
13 changed files
with
115 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
* | ||
# Just enough files for `git rev-parse --short HEAD` to work (used in Substrate node build) | ||
!/.git/refs/heads | ||
!/.git/config | ||
!/.git/HEAD | ||
!/crates | ||
!/node-template-subspace | ||
!/substrate | ||
!/Cargo.lock | ||
!/Cargo.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM ubuntu:20.04 | ||
|
||
WORKDIR /code | ||
|
||
RUN \ | ||
apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
llvm \ | ||
clang && \ | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly | ||
|
||
RUN /root/.cargo/bin/rustup target add wasm32-unknown-unknown | ||
|
||
COPY Cargo.lock /code/Cargo.lock | ||
COPY Cargo.toml /code/Cargo.toml | ||
|
||
# Up until this line all Rust images in this repo should be the same to share the same layers | ||
|
||
COPY .git /code/.git | ||
# Just an empty directory for Git to recognize it is indeed a Git repository | ||
RUN mkdir /code/.git/objects | ||
COPY crates /code/crates | ||
COPY substrate /code/substrate | ||
COPY node-template-subspace /code/node-template-subspace | ||
|
||
RUN \ | ||
/root/.cargo/bin/cargo build --release --bin node-template-subspace && \ | ||
mv target/release/node-template-subspace subspace-node && \ | ||
rm -rf target | ||
|
||
FROM ubuntu:20.04 | ||
|
||
RUN \ | ||
apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=0 /code/subspace-node /subspace-node | ||
|
||
RUN mkdir /var/subspace && chown nobody:nogroup /var/subspace | ||
|
||
VOLUME /var/subspace | ||
|
||
USER nobody:nogroup | ||
|
||
ENTRYPOINT ["/subspace-node"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.