-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitpod.Dockerfile
67 lines (54 loc) · 2.6 KB
/
.gitpod.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
FROM gitpod/workspace-full-vnc
SHELL ["/bin/bash", "-c"]
ENV ANDROID_HOME=/home/gitpod/androidsdk \
FLUTTER_VERSION=2.2.3-stable
# 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
# 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 30
USER gitpod
RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-30" "emulator"
RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-30;google_apis;x86_64"
RUN echo no | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n avd28 -k "system-images;android-30;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