FROM gitpod/workspace-full-vnc SHELL ["/bin/bash", "-c"] # insall flutter and android sdk/ndk/avd/java/gradle ENV ANDROID_HOME=/home/gitpod/androidsdk \ FLUTTER_VERSION=3.0.5-stable ENV ANDROID_VERSION=30 # # Install dart # USER root # RUN curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ # && curl -fsSL https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list \ # && install-packages build-essential dart libkrb5-dev gcc make gradle android-tools-adb android-tools-fastboot # Install flutter USER gitpod RUN cd /home/gitpod \ && wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}.tar.xz \ && tar -xvf flutter*.tar.xz \ && rm -f flutter*.tar.xz RUN flutter/bin/flutter precache RUN echo 'export PATH="$PATH:/home/gitpod/flutter/bin"' >> /home/gitpod/.bashrc # Install Open JDK # USER root # RUN apt update \ # && apt install openjdk-8-jdk -y \ # && update-java-alternatives --set java-1.8.0-openjdk-amd64 USER gitpod RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh && \ sdk install java 17.0.3-ms && \ sdk default java 17.0.3-ms" # Install SDK Manager USER gitpod RUN wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip \ && mkdir -p $ANDROID_HOME/cmdline-tools/latest \ && unzip commandlinetools-linux-*.zip -d $ANDROID_HOME \ && rm -f commandlinetools-linux-*.zip \ && mv $ANDROID_HOME/cmdline-tools/bin $ANDROID_HOME/cmdline-tools/latest \ && mv $ANDROID_HOME/cmdline-tools/lib $ANDROID_HOME/cmdline-tools/latest RUN echo "export ANDROID_HOME=$ANDROID_HOME" >> /home/gitpod/.bashrc \ && echo 'export PATH=$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$PATH' >> /home/gitpod/.bashrc # Install Android Image version $ANDROID_VERSION USER gitpod RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-$ANDROID_VERSION" "emulator" 'build-tools;28.0.3' RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-$ANDROID_VERSION;google_apis;x86_64" RUN echo no | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n avd28 -k "system-images;android-$ANDROID_VERSION;google_apis;x86_64" # Install Google Chrome USER root RUN apt-get update \ && apt-get install -y apt-transport-https \ && curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \ && echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \ && apt-get update \ && sudo apt-get install -y google-chrome-stable # misc deps RUN apt-get install -y \ libasound2-dev \ libgtk-3-dev \ libnss3-dev \ fonts-noto \ fonts-noto-cjk # For Qt WebEngine on docker ENV QTWEBENGINE_DISABLE_SANDBOX 1 USER gitpod # Install Node and Yarn ENV NODE_VERSION=10.14 RUN bash -c ". .nvm/nvm.sh && nvm install ${NODE_VERSION} && nvm use ${NODE_VERSION} && nvm alias default ${NODE_VERSION}" RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix RUN npm install -g nativescript@6.5.1