Dockerfile 1.4 KB

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