joystream-node.Dockerfile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM joystream/rust-builder AS builder
  2. LABEL description="Compiles all workspace artifacts"
  3. WORKDIR /joystream
  4. COPY . /joystream
  5. # Build all cargo crates
  6. # Ensure our tests and linter pass before actual build
  7. RUN WASM_BUILD_TOOLCHAIN=nightly-2020-05-23 BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings \
  8. WASM_BUILD_TOOLCHAIN=nightly-2020-05-23 cargo test --release --all && \
  9. WASM_BUILD_TOOLCHAIN=nightly-2020-05-23 cargo build --release
  10. FROM debian:stretch
  11. LABEL description="Joystream node"
  12. WORKDIR /joystream
  13. COPY --from=builder /joystream/target/release/joystream-node /joystream/node
  14. COPY --from=builder /joystream/target/release/wbuild/joystream-node-runtime/joystream_node_runtime.compact.wasm /joystream/runtime.compact.wasm
  15. COPY --from=builder /joystream/target/release/chain-spec-builder /joystream/chain-spec-builder
  16. # confirm it works
  17. RUN /joystream/node --version
  18. # https://manpages.debian.org/stretch/coreutils/b2sum.1.en.html
  19. # RUN apt-get install coreutils
  20. # print the blake2 256 hash of the wasm blob
  21. RUN b2sum -l 256 /joystream/runtime.compact.wasm
  22. # print the blake2 512 hash of the wasm blob
  23. RUN b2sum -l 512 /joystream/runtime.compact.wasm
  24. EXPOSE 30333 9933 9944
  25. # Use these volumes to persits chain state and keystore, eg.:
  26. # --base-path /data
  27. # optionally separate keystore (otherwise it will be stored in the base path)
  28. # --keystore-path /keystore
  29. # if base-path isn't specified, chain state is stored inside container in ~/.local/share/joystream-node/
  30. # which is not ideal
  31. VOLUME ["/data", "/keystore"]
  32. ENTRYPOINT ["/joystream/node"]