Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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. 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. # confirm it works
  13. RUN /joystream/node --version
  14. # https://manpages.debian.org/stretch/coreutils/b2sum.1.en.html
  15. # RUN apt-get install coreutils
  16. # print the blake2 256 hash of the wasm blob
  17. RUN b2sum -l 256 /joystream/runtime.compact.wasm
  18. # print the blake2 512 hash of the wasm blob
  19. RUN b2sum -l 512 /joystream/runtime.compact.wasm
  20. EXPOSE 30333 9933 9944
  21. # Use these volumes to persits chain state and keystore, eg.:
  22. # --base-path /data
  23. # optionally separate keystore (otherwise it will be stored in the base path)
  24. # --keystore-path /keystore
  25. # if base-path isn't specified, chain state is stored inside container in ~/.local/share/joystream-node/
  26. # which is not ideal
  27. VOLUME ["/data", "/keystore"]
  28. ENTRYPOINT ["/joystream/node"]