.gitpod.Dockerfile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. FROM gitpod/workspace-full-vnc
  2. SHELL ["/bin/bash", "-c"]
  3. ENV ANDROID_HOME=/home/gitpod/androidsdk \
  4. FLUTTER_VERSION=2.2.3-stable
  5. # Install dart
  6. USER root
  7. RUN curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
  8. && curl -fsSL https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list \
  9. && install-packages build-essential dart libkrb5-dev gcc make gradle android-tools-adb android-tools-fastboot
  10. # Install flutter
  11. USER gitpod
  12. RUN cd /home/gitpod \
  13. && wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}.tar.xz \
  14. && tar -xvf flutter*.tar.xz \
  15. && rm -f flutter*.tar.xz
  16. RUN flutter/bin/flutter precache
  17. RUN echo 'export PATH="$PATH:/home/gitpod/flutter/bin"' >> /home/gitpod/.bashrc
  18. # Install Open JDK
  19. USER root
  20. RUN apt update \
  21. && apt install openjdk-8-jdk -y \
  22. && update-java-alternatives --set java-1.8.0-openjdk-amd64
  23. # Install SDK Manager
  24. USER gitpod
  25. RUN wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip \
  26. && mkdir -p $ANDROID_HOME/cmdline-tools/latest \
  27. && unzip commandlinetools-linux-*.zip -d $ANDROID_HOME \
  28. && rm -f commandlinetools-linux-*.zip \
  29. && mv $ANDROID_HOME/cmdline-tools/bin $ANDROID_HOME/cmdline-tools/latest \
  30. && mv $ANDROID_HOME/cmdline-tools/lib $ANDROID_HOME/cmdline-tools/latest
  31. RUN echo "export ANDROID_HOME=$ANDROID_HOME" >> /home/gitpod/.bashrc \
  32. && echo 'export PATH=$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$PATH' >> /home/gitpod/.bashrc
  33. # Install Android Image version 30
  34. USER gitpod
  35. RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-30" "emulator"
  36. RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-30;google_apis;x86_64"
  37. RUN echo no | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n avd28 -k "system-images;android-30;google_apis;x86_64"
  38. # Install Google Chrome
  39. USER root
  40. RUN apt-get update \
  41. && apt-get install -y apt-transport-https \
  42. && curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
  43. && echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
  44. && apt-get update \
  45. && sudo apt-get install -y google-chrome-stable
  46. # misc deps
  47. RUN apt-get install -y \
  48. libasound2-dev \
  49. libgtk-3-dev \
  50. libnss3-dev \
  51. fonts-noto \
  52. fonts-noto-cjk
  53. # For Qt WebEngine on docker
  54. ENV QTWEBENGINE_DISABLE_SANDBOX 1