Dockerfile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. wget
  23. RUN apt install -y openssh-server
  24. RUN git clone --branch v1.6.1 https://gitee.com/mirrors/google-benchmark benchmark && \
  25. cd benchmark && \
  26. git clone --branch release-1.11.0 https://gitee.com/mirrors/googletest && \
  27. cmake -E make_directory "build" && \
  28. cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release ../ && \
  29. cmake --build "build" --config Release -j && \
  30. sudo cmake --build "build" --config Release --target install -j
  31. # Get Rust
  32. # change source of Rust
  33. ADD rust_config /root/.cargo/config
  34. ENV RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
  35. ENV RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
  36. ENV PATH="/root/.cargo/bin:${PATH}"
  37. RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain='1.52.0' && \
  38. rustup target add i686-pc-windows-gnu
  39. RUN apt-get install -y \
  40. ninja-build \
  41. valgrind \
  42. mingw-w64 \
  43. mingw-w64-tools \
  44. mingw-w64-i686-dev \
  45. mingw-w64-x86-64-dev \
  46. wine \
  47. cbindgen
  48. # only need on ubuntu20.04
  49. # RUN dpkg --add-architecture i386 && apt-get update && apt-get install wine32 -y
  50. RUN apt-get install -y golang
  51. RUN go env -w GO111MODULE=on
  52. RUN go env -w GOPROXY=https://goproxy.cn
  53. RUN git clone https://gitee.com/lyon1998/pikascript root/pikascript
  54. RUN cd /root/pikascript && git pull
  55. RUN apt-get install -y upx
  56. RUN cd /root/pikascript/tools/pikaCompiler && cargo build
  57. ADD .vimrc /root/.vimrc
  58. ADD bashrc /root/.bashrc
  59. RUN apt-get install -y liblua5.3-dev
  60. RUN apt-get install -y lcov
  61. RUN cd root/pikascript && git remote add github https://github.com/pikastech/pikascript
  62. RUN apt-get install clangd -y
  63. RUN apt-get install libmbedtls-dev -y
  64. RUN pip install -r /root/pikascript/docker/requirements.txt
  65. RUN apt-get install clang-format -y
  66. # install frps
  67. RUN cd /root && wget https://gitee.com/Lyon1998/pikapython/attach_files/1420660/download -O frp.tar.gz && \
  68. tar -xzvf frp.tar.gz && \
  69. mv frp_0.48.0_linux_amd64/frpc /usr/local/bin/frpc
  70. ADD sshd_config /etc/ssh/sshd_config
  71. COPY frpc.ini /etc/frpc.ini
  72. COPY frpc.sh /etc/frpc.sh