1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- FROM rust:1.52.1-buster AS rust
- RUN rustup self update
- RUN rustup install nightly-2021-03-24 --force
- RUN rustup default nightly-2021-03-24
- RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-24
- RUN rustup component add --toolchain nightly-2021-03-24 clippy
- RUN apt-get update && \
- apt-get install -y curl git gcc xz-utils sudo pkg-config unzip clang llvm libc6-dev
- FROM rust AS builder
- LABEL description="Compiles all workspace artifacts"
- WORKDIR /joystream
- COPY . /joystream
- ENV WASM_BUILD_TOOLCHAIN=nightly-2021-03-24
- RUN apt-get install -y libprotobuf-dev protobuf-compiler
- RUN BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings && \
- cargo test --release --all && \
- cargo build --target armv7-unknown-linux-gnueabihf --release
- FROM ubuntu:21.04
- LABEL description="Joystream node"
- WORKDIR /joystream
- COPY --from=builder /joystream/target/armv7-unknown-linux-gnueabihf/release/joystream-node /joystream/node
- COPY --from=builder /joystream/target/armv7-unknown-linux-gnueabihf/release/wbuild/joystream-node-runtime/joystream_node_runtime.compact.wasm /joystream/runtime.compact.wasm
- COPY --from=builder /joystream/target/armv7-unknown-linux-gnueabihf/release/chain-spec-builder /joystream/chain-spec-builder
- RUN /joystream/node --version
- RUN b2sum -l 256 /joystream/runtime.compact.wasm
- RUN b2sum -l 512 /joystream/runtime.compact.wasm
- EXPOSE 30333 9933 9944
- VOLUME ["/data", "/keystore"]
- ENTRYPOINT ["/joystream/node"]
|