This repository has been archived by the owner on Jul 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(node): Change RuntimeVersion impl_name to plug-node. According to
https://crates.parity.io/sr_version/struct.RuntimeVersion.html, this will not affect functionality. chore(node): Replaced Substrate with Plug. Added Plug Developers to author information. Set version to 0.0.0 - to be updated to 1.0.0 when we release Plug chore(Dockerfile): Updated Dockerfile names and descriptions for Plug. Removed incorrect maintainer details. signing commit
- Loading branch information
Showing
5 changed files
with
37 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
[[bin]] | ||
name = "substrate" | ||
name = "plug" | ||
path = "node/src/main.rs" | ||
|
||
[package] | ||
name = "substrate" | ||
version = "2.0.0" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
name = "plug" | ||
version = "0.0.0" | ||
authors = ["Plug Developers <[email protected]>", "Parity Technologies <[email protected]>"] | ||
build = "build.rs" | ||
edition = "2018" | ||
|
||
|
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 |
---|---|---|
@@ -1,20 +1,24 @@ | ||
# Note: We don't use Alpine and its packaged Rust/Cargo because they're too often out of date, | ||
# preventing them from being used to build Substrate/Polkadot. | ||
# preventing them from being used to build Substrate/Polkadot/Plug. | ||
|
||
FROM phusion/baseimage:0.10.2 as builder | ||
LABEL maintainer="[email protected]" | ||
LABEL description="This is the build stage for Substrate. Here we create the binary." | ||
LABEL description="Pl^g build image: The Pl^g binary is built here." | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
ARG PROFILE=release | ||
WORKDIR /substrate | ||
WORKDIR /plug | ||
|
||
COPY . /substrate | ||
COPY . /plug | ||
|
||
RUN apt-get update && \ | ||
apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold" && \ | ||
apt-get install -y cmake pkg-config libssl-dev git clang | ||
apt-get install -y \ | ||
clang \ | ||
cmake \ | ||
git \ | ||
libssl-dev \ | ||
pkg-config | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ | ||
export PATH="$PATH:$HOME/.cargo/bin" && \ | ||
|
@@ -27,29 +31,28 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ | |
# ===== SECOND STAGE ====== | ||
|
||
FROM phusion/baseimage:0.10.2 | ||
LABEL maintainer="[email protected]" | ||
LABEL description="This is the 2nd stage: a very small image where we copy the Substrate binary." | ||
LABEL description="Pl^g runner image: A minimal image for running Pl^g." | ||
ARG PROFILE=release | ||
|
||
RUN mv /usr/share/ca* /tmp && \ | ||
rm -rf /usr/share/* && \ | ||
mv /tmp/ca-certificates /usr/share/ && \ | ||
mkdir -p /root/.local/share/Polkadot && \ | ||
ln -s /root/.local/share/Polkadot /data && \ | ||
useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate | ||
useradd -m -u 1000 -U -s /bin/sh -d /plug plug | ||
|
||
COPY --from=builder /substrate/target/$PROFILE/substrate /usr/local/bin | ||
COPY --from=builder /plug/target/$PROFILE/plug /usr/local/bin | ||
|
||
# checks | ||
RUN ldd /usr/local/bin/substrate && \ | ||
/usr/local/bin/substrate --version | ||
RUN ldd /usr/local/bin/plug && \ | ||
/usr/local/bin/plug --version | ||
|
||
# Shrinking | ||
RUN rm -rf /usr/lib/python* && \ | ||
rm -rf /usr/bin /usr/sbin /usr/share/man | ||
|
||
USER substrate | ||
USER plug | ||
EXPOSE 30333 9933 9944 | ||
VOLUME ["/data"] | ||
|
||
CMD ["/usr/local/bin/substrate"] | ||
CMD ["/usr/local/bin/plug"] |
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