Dockerfile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM joystream/rust-builder AS builder
  2. LABEL description="Compiles all workspace artifacts"
  3. WORKDIR /joystream
  4. COPY . /joystream
  5. # Make sure tests pass before continuing
  6. RUN BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release -- -D warnings
  7. RUN cargo test --release
  8. # Build joystream-node and its dependencies - runtime
  9. RUN BUILD_DUMMY_WASM_BINARY=0 cargo build --release -p joystream-node
  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. # 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"]