build.sh
: Build crust official docker image.build_env.sh
: Build crust's dependencies, includingrust
,nightly toolchain
,wasm toolchain
andllvm
.build_bin.sh
: Build crust native binary on linux.
Please run the scripts under the root of this repository. DO NOT run from docker
folder!
docker/build_env.sh
- First build
crust_bin
docker/build_bin.sh
Hints
- Use
-m
flag to use a Chinese cargo mirror, cargo package downloads will be much faster for Chinese developers. - Use
-c
flag to specify a custom cargo cache location, it defaults to docker/.cache, you may want to change it if you want share cargo cache between multiple clones. - Use
-r
to perform a full build (equals tocargo clean & cargo build
). - Use
-p
to push to Docker Hub
- Then, build and push crust (with
docker push
)
docker/build.sh
docker pull crustio/crust:mainnet
docker run -v /tmp/crust:/tmp/crust --network host crustio/crust:mainnet ./crust --base-path /tmp/chain --chain mainnet [more_options]
docker pull crustio/crust:maxwell
docker run -v /tmp/crust:/tmp/crust --network host crustio/crust:maxwell ./crust --base-path /tmp/chain --chain maxwell [more_options]
docker pull crustio/crust:rocky
docker run -v /tmp/crust:/tmp/crust --network host crustio/crust:rocky ./crust --base-path /tmp/chain --chain rocky [more_options]
[more_options] can be:
--rpc-external
: Specify HTTP RPC server TCP port, default is9933
.--ws-external
: Specify WebSockets RPC server TCP port, default is9944
.--rpc-cors all
: Specify browser Origins allowed to access the HTTP & WS RPC servers.--bootnodes
: Specify a list of bootnodes.- More options can be found with
--help
.