-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 1004 Bytes
/
Dockerfile
File metadata and controls
33 lines (26 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM paritytech/ci-linux:production as build
WORKDIR /code
COPY . .
# Install Rust 1.79.0
RUN rustup toolchain install 1.79.0
RUN rustup default 1.79.0
# Add the wasm32 target for Rust 1.79.0
RUN rustup target add wasm32-unknown-unknown --toolchain 1.79.0-x86_64-unknown-linux-gnu
RUN rustup component add rust-src --toolchain 1.79.0-x86_64-unknown-linux-gnu
# Build the project using Rust 1.79.0
RUN cargo +1.79.0 build --release
FROM ubuntu:22.04
WORKDIR /node-template
# Copy the node binary.
COPY --from=build /code/target/release/node-template .
# Install root certs, see: https://github.com/paritytech/substrate/issues/9984
RUN apt update && \
apt install -y ca-certificates && \
update-ca-certificates && \
apt remove ca-certificates -y && \
rm -rf /var/lib/apt/lists/*
EXPOSE 9944
# Exposing unsafe RPC methods is needed for testing but should not be done in
# production.
#CMD [ "./node-template", "--dev", "--ws-external", "--rpc-external"]
ENTRYPOINT ["./node-template"]