This is a helper Dockerfile that allows to build contracts in a reproducible way.
The contract built in the Docker will result in a binary that is the same if built on other machines.
For this you need to setup Docker first.
./build.sh
By default, the following command will launch a docker instance and will mount this near-sdk-rs
under /host
.
./run.sh
If you need to compile some other contracts, you can first export the path to the contracts, e.g.
export HOST_DIR=/root/contracts/
Enter mounted path first:
cd /host
For example, to build contracts in near-sdk-rs
do the following:
cd examples
./build_all.sh