Dockerfile 1.3 KB

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