12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- FROM gitpod/workspace-full-vnc
- SHELL ["/bin/bash", "-c"]
- # install android sdk
- # 采用 commandlinetools 安装,android 30
- USER root
- ENV ANDROID_HOME=/home/gitpod/androidsdk \
- FLUTTER_VERSION=3.0.5-stable
- # 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 yes | sdk install java 11.0.16-amzn && sdk default java 11.0.16-amzn
- # Install SDK Manager commandlinetools
- 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 30
- USER gitpod
- RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-31" "emulator"
- RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-31;google_apis;x86_64"
- RUN echo no | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n avd28 -k "system-images;android-31;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
|