build-with-docker.sh 1.1 KB

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Build the toolchain image - contains only the compiler environmet for building runtime
  3. # This is then pushed to docker hub: https://cloud.docker.com/repository/docker/mokhtargz/wasm-toolchain/general
  4. # docker build --tag mokhtargz/wasm-toolchain --file ./wasm_dockerfile .
  5. # Build the runtime in a new image
  6. docker build --tag runtime-build --file ./runtime_dockerfile .
  7. # Create a non running container from the runtime build image
  8. docker create --name runtime-container runtime-build
  9. # Copy the compiled wasm blob from the docker container to our host
  10. docker cp runtime-container:/runtime/wasm/target/wasm32-unknown-unknown/release/joystream_node_runtime_wasm.compact.wasm joystream_runtime.wasm
  11. docker rm runtime-container
  12. # compute blake2_256 hash of the wasm blob - this should match the hash computed when the runtime file is
  13. # used to create a runtime upgrade proposal.
  14. # osx with: brew install b2sum; b2sum -b blake2b -l 256 joystream_runtime.wasm
  15. # ubuntu 17.0+ with: apt-get install coreutils; b2sum -l 256 joystream_runtime.wasm
  16. b2sum -l 256 joystream_runtime.wasm