|
@@ -0,0 +1,37 @@
|
|
|
+FROM joystream/rust-builder AS builder
|
|
|
+LABEL description="Compiles all workspace artifacts"
|
|
|
+WORKDIR /joystream
|
|
|
+COPY . /joystream
|
|
|
+
|
|
|
+# Build joystream-node and its dependencies - runtime
|
|
|
+RUN cargo build --release -p joystream-node
|
|
|
+RUN /joystream/scripts/create-test-chainspec.sh
|
|
|
+
|
|
|
+FROM debian:stretch
|
|
|
+LABEL description="Joystream node"
|
|
|
+WORKDIR /joystream
|
|
|
+COPY --from=builder /joystream/target/release/joystream-node /joystream/node
|
|
|
+COPY --from=builder /joystream/target/release/wbuild/joystream-node-runtime/joystream_node_runtime.compact.wasm /joystream/runtime.compact.wasm
|
|
|
+COPY --from=builder /joystream/.tmp/chainspec.json /joystream/chainspec.json
|
|
|
+
|
|
|
+# confirm it works
|
|
|
+RUN /joystream/node --version
|
|
|
+
|
|
|
+# https://manpages.debian.org/stretch/coreutils/b2sum.1.en.html
|
|
|
+# RUN apt-get install coreutils
|
|
|
+# print the blake2 256 hash of the wasm blob
|
|
|
+RUN b2sum -l 256 /joystream/runtime.compact.wasm
|
|
|
+# print the blake2 512 hash of the wasm blob
|
|
|
+RUN b2sum -l 512 /joystream/runtime.compact.wasm
|
|
|
+
|
|
|
+EXPOSE 30333 9933 9944
|
|
|
+
|
|
|
+# 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 base-path isn't specified, chain state is stored inside container in ~/.local/share/joystream-node/
|
|
|
+# which is not ideal
|
|
|
+VOLUME ["/data", "/keystore"]
|
|
|
+
|
|
|
+ENTRYPOINT ["/joystream/node"]
|