joystream-node.Dockerfile 1.4 KB

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