Dockerfile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. FROM ubuntu:22.04
  2. ADD ubuntu22_sources.list /etc/apt/sources.list
  3. RUN touch /etc/apt/apt.conf.d/99verify-peer.conf \
  4. && echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }"
  5. RUN echo 'Asia/Shanghai' >/etc/timezone
  6. # Update new packages
  7. RUN apt-get update
  8. RUN DEBIAN_FRONTEND=noninteractive apt install -y tzdata
  9. RUN apt-get install -y \
  10. build-essential \
  11. make \
  12. g++ \
  13. gcc \
  14. git \
  15. vim \
  16. cmake \
  17. sudo \
  18. curl \
  19. python3 \
  20. pip \
  21. cloc
  22. RUN git clone --branch v1.6.1 https://gitee.com/mirrors/google-benchmark benchmark && \
  23. cd benchmark && \
  24. git clone --branch release-1.11.0 https://gitee.com/mirrors/googletest && \
  25. cmake -E make_directory "build" && \
  26. cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release ../ && \
  27. cmake --build "build" --config Release -j && \
  28. sudo cmake --build "build" --config Release --target install -j
  29. # Get Rust
  30. # change source of Rust
  31. ADD rust_config /root/.cargo/config
  32. ENV RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
  33. ENV RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
  34. RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
  35. ENV PATH="/root/.cargo/bin:${PATH}"
  36. RUN apt-get install -y \
  37. ninja-build \
  38. valgrind \
  39. mingw-w64 \
  40. mingw-w64-tools \
  41. mingw-w64-i686-dev \
  42. mingw-w64-x86-64-dev \
  43. wine \
  44. cbindgen
  45. # only need on ubuntu20.04
  46. # RUN dpkg --add-architecture i386 && apt-get update && apt-get install wine32 -y
  47. RUN apt-get install -y golang
  48. RUN go env -w GO111MODULE=on
  49. RUN go env -w GOPROXY=https://goproxy.cn
  50. RUN git clone https://gitee.com/lyon1998/pikascript root/pikascript
  51. RUN cd /root/pikascript && git pull
  52. RUN apt-get install -y upx
  53. RUN rustup target add i686-pc-windows-gnu
  54. RUN cd /root/pikascript/tools/pikaCompiler && sh build.sh
  55. ADD .vimrc /root/.vimrc
  56. ADD bashrc /root/.bashrc
  57. RUN apt-get install -y liblua5.3-dev
  58. RUN apt-get install -y lcov
  59. RUN apt-get install -y wget
  60. RUN cd root/pikascript && git remote add github https://github.com/pikastech/pikascript
  61. RUN apt-get install clangd -y
  62. RUN apt-get install libmbedtls-dev -y
  63. RUN pip install -r /root/pikascript/docker/requirements.txt
  64. RUN apt-get install clang-format -y