forked from gbrah/gitpod-android-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitpod.Dockerfile
41 lines (34 loc) · 1.82 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
FROM gitpod/workspace-full-vnc
SHELL ["/bin/bash", "-c"]
ENV ANDROID_HOME=$HOME/Android/Sdk
ENV PATH="$HOME/Android/Sdk/emulator:$HOME/Android/Sdk/tools:$HOME/Android/Sdk/cmdline-tools/latest/bin:$HOME/Android/Sdk/platform-tools:$PATH"
# Install Open JDK for android and other dependencies
USER root
RUN curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.gpg | sudo apt-key add - \
&& curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.list | sudo tee /etc/apt/sources.list.d/tailscale.list \
&& apt-get update \
&& apt-get install -y tailscale
RUN update-alternatives --set ip6tables /usr/sbin/ip6tables-nft
# RUN install-packages openjdk-8-jdk -y \
# libgtk-3-dev \
# libnss3-dev \
# fonts-noto \
# fonts-noto-cjk \
# && update-java-alternatives --set java-1.8.0-openjdk-amd64
# Make some changes for our vnc client
RUN sed -i 's|resize=scale|resize=remote|g' /opt/novnc/index.html
USER gitpod
# Install Android studio and dependencies
RUN cd $HOME && wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2022.2.1.18/android-studio-2022.2.1.18-linux.tar.gz && tar zxvf android-studio-2022.2.1.18-linux.tar.gz && rm -r android-studio-2022.2.1.18-linux.tar.gz
# Install Android SDK
RUN mkdir -p /home/gitpod/Android/Sdk
RUN wget "https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip"
RUN unzip "commandlinetools-linux-9477386_latest.zip" -d $ANDROID_HOME
RUN rm -f "commandlinetools-linux-9477386_latest.zip"
RUN mkdir -p $ANDROID_HOME/cmdline-tools/latest
RUN mv $ANDROID_HOME/cmdline-tools/{bin,lib} $ANDROID_HOME/cmdline-tools/latest
COPY idea.properties /home/gitpod/android-studio/bin/idea.properties
#RUN \
# yes | sdkmanager --licenses
#RUN \
# yes | sdkmanager "platform-tools" "build-tools;33.0.2" "platforms;android-33"