|
@@ -1,22 +1,26 @@
|
|
|
-FROM liuchong/rustup:1.41.1 AS builder
|
|
|
-LABEL description="Joystream substrate node"
|
|
|
+FROM joystream/rust-builder AS node-build
|
|
|
+LABEL description="Compiles joystream substrate node"
|
|
|
|
|
|
WORKDIR /joystream
|
|
|
+# if source files change will the intermediate image be rebuilt?
|
|
|
COPY . /joystream
|
|
|
ENV TERM=xterm
|
|
|
|
|
|
-RUN apt-get update && apt-get install git clang -y \
|
|
|
- && ./setup.sh \
|
|
|
- && cargo build --release \
|
|
|
- && cp ./target/release/joystream-node . \
|
|
|
- && cargo clean \
|
|
|
- && rm -fr target \
|
|
|
- && rm -fr ~/.cargo \
|
|
|
- && rm -fr ~/.rustup \
|
|
|
- && apt-get remove git clang -y \
|
|
|
- && rm -fr /var/lib/apt/lists/*
|
|
|
+RUN cargo build --release
|
|
|
|
|
|
-VOLUME ["/data", "/keystore"]
|
|
|
+FROM debian:stretch
|
|
|
+LABEL description="Joystream node"
|
|
|
+
|
|
|
+WORKDIR /joystream
|
|
|
+ENV TERM=xterm
|
|
|
+
|
|
|
+COPY --from=node-build /joystream/target/release/joystream-node /joystream
|
|
|
|
|
|
-ENTRYPOINT ["/joystream/joystream-node"]
|
|
|
+# Use these volumes to persits chain state and keystore, eg.:
|
|
|
+# --base-path /data
|
|
|
+# optionally separate keystore (otherwise it will be stored in the base path)
|
|
|
+# --keystore-path /keystore
|
|
|
+# if basepath isn't specified it will be inside container in ~/.local/share/joystream-node/
|
|
|
+VOLUME ["/data", "/keystore"]
|
|
|
|
|
|
+ENTRYPOINT ["/joystream/joystream-node"]
|