Dockerfile 1.2 KB

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