Dockerfile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
  2. ENV HOME=/home/vscode
  3. ENV WORKDIR=$HOME/rustdesk
  4. WORKDIR $HOME
  5. RUN sudo apt update -y && sudo apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake unzip zip sudo libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
  6. WORKDIR /
  7. RUN git clone https://github.com/microsoft/vcpkg
  8. WORKDIR vcpkg
  9. RUN git checkout 2023.04.15
  10. RUN /vcpkg/bootstrap-vcpkg.sh -disableMetrics
  11. ENV VCPKG_ROOT=/vcpkg
  12. RUN $VCPKG_ROOT/vcpkg --disable-metrics install libvpx libyuv opus aom
  13. WORKDIR /
  14. RUN wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/dep.tar.gz && tar xzf dep.tar.gz
  15. USER vscode
  16. WORKDIR $HOME
  17. RUN wget https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so
  18. RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
  19. RUN chmod +x rustup.sh
  20. RUN $HOME/rustup.sh -y
  21. RUN $HOME/.cargo/bin/rustup target add aarch64-linux-android
  22. RUN $HOME/.cargo/bin/cargo install cargo-ndk
  23. # Install Flutter
  24. RUN wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.10.1-stable.tar.xz
  25. RUN tar xf flutter_linux_3.10.1-stable.tar.xz && rm flutter_linux_3.10.1-stable.tar.xz
  26. ENV PATH="$PATH:$HOME/flutter/bin"
  27. RUN dart pub global activate ffigen 5.0.1
  28. # Install packages
  29. RUN sudo apt-get install -y libclang-dev
  30. RUN sudo apt install -y gcc-multilib
  31. WORKDIR $WORKDIR
  32. ENV ANDROID_NDK_HOME=/opt/android/ndk/22.1.7171670
  33. # Somehow try to automate flutter pub get
  34. # https://rustdesk.com/docs/en/dev/build/android/
  35. # Put below steps in entrypoint.sh
  36. # cd flutter
  37. # wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/so.tar.gz
  38. # tar xzf so.tar.gz
  39. # own /opt/android