-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.amd64
34 lines (29 loc) · 1.27 KB
/
Dockerfile.amd64
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
34
FROM paritytech/ci-linux:production as build
WORKDIR /code
COPY . .
# the latest release of ahash uses build_hasher_simple_hash_one
# which was stabilized in 1.71 but the latest rustc version
# from the paritytech/ci-linux:production is 1.68.0.
# RUN cargo +nightly update -p [email protected] --precise 0.8.6
# RUN rustup toolchain uninstall stable && rustup toolchain install stable
# RUN rustup target add wasm32-unknown-unknown --toolchain stable-x86_64-unknown-linux-gnu
RUN rustup toolchain uninstall nightly
RUN rustup toolchain install nightly
RUN rustup target add wasm32-unknown-unknown --toolchain nightly-x86_64-unknown-linux-gnu
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
RUN cargo +nightly build --release
FROM ubuntu:22.04
WORKDIR /node
# Copy the node binary.
COPY --from=build /code/target/release/node .
# 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"]