Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iso/20240412 t0953 docker #854

Merged
merged 4 commits into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 5 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
FROM ubuntu as builder
FROM rust:1.77.2-slim-bookworm as builder

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 bzip2
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 && \
RUN apt-get update && apt-get install -qy cmake pkg-config libssl-dev git clang build-essential curl protobuf-compiler
RUN rustup component add rust-src && rustup target add wasm32-unknown-unknown --toolchain stable
RUN cargo build -p nodle-parachain --$PROFILE && \
bunzip2 node/res/paradis.json.bz2

# ===== SECOND STAGE ======

FROM ubuntu
FROM rust:1.77.2-slim-bookworm as runtime

ARG PROFILE=release

RUN install -d /usr/local/share/nodle
COPY --from=builder /nodle-chain/target/$PROFILE/nodle-parachain /usr/local/bin
COPY --from=builder /nodle-chain/node/res/paradis.json /usr/local/share/nodle

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/ && \
Expand Down