-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
6 additions
and
43 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
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,41 +1,6 @@ | ||
FROM ubuntu as builder | ||
FROM nodlecode/chain:2.2.2 | ||
|
||
ARG PROFILE=release | ||
WORKDIR /nodle-chain | ||
|
||
COPY . /nodle-chain | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y cmake pkg-config libssl-dev git clang build-essential curl protobuf-compiler | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ | ||
export PATH=$PATH:$HOME/.cargo/bin && \ | ||
scripts/init.sh && \ | ||
cargo build -p nodle-parachain --$PROFILE | ||
|
||
# ===== SECOND STAGE ====== | ||
|
||
FROM ubuntu | ||
|
||
ARG PROFILE=release | ||
|
||
COPY --from=builder /nodle-chain/target/$PROFILE/nodle-parachain /usr/local/bin | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y curl netcat | ||
|
||
RUN mv /usr/share/ca* /tmp && \ | ||
rm -rf /usr/share/* && \ | ||
mv /tmp/ca-certificates /usr/share/ && \ | ||
rm -rf /usr/lib/python* && \ | ||
useradd -m -u 1000 -U -s /bin/sh -d /nodle-chain nodle-chain && \ | ||
mkdir -p /nodle-chain/.local/share/nodle-chain && \ | ||
chown -R nodle-chain:nodle-chain /nodle-chain/.local && \ | ||
ln -s /nodle-chain/.local/share/nodle-chain /data | ||
|
||
USER nodle-chain | ||
EXPOSE 30333 9933 9944 | ||
VOLUME ["/data"] | ||
RUN mkdir /custom-wasm | ||
ADD ./runtime_eden.compact.compressed.wasm /custom-wasm/runtime_eden.compact.compressed.wasm | ||
|
||
ENTRYPOINT ["nodle-parachain"] |
Binary file not shown.