build_in_docker.sh 443 B

12345678910
  1. docker rm -f dragonos-build || echo "No existed container"
  2. cpu_count=$(cat /proc/cpuinfo |grep "processor"|wc -l)
  3. docker run --rm --privileged=true --cap-add SYS_ADMIN --cap-add MKNOD -v $(pwd):/data -v /dev:/dev -v dragonos-build-cargo:/root/.cargo/registry --name dragonos-build -i dragonos/dragonos-dev:v1.8 bash << EOF
  4. source ~/.cargo/env
  5. source ~/.bashrc
  6. cd /data
  7. # Change rust src
  8. bash tools/change_rust_src.sh
  9. make all -j $cpu_count
  10. EOF