1+ FROM gitpod/workspace-full-vnc@sha256:331a933c3bce7d7cb3e78f8cfac93ae706091575758adeba3a86072d585e52b0
2+
3+ ARG ANDROID_STUDIO_URL=https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2023.1.1.28/android-studio-2023.1.1.28-linux.tar.gz
4+ ARG ANDROID_STUDIO_VERSION=2023.1.1
5+
6+ USER root
7+
8+ # Install dependencies
9+ RUN dpkg --add-architecture i386 && \
10+ apt-get update && \
11+ DEBIAN_FRONTEND=noninteractive apt-get install -y \
12+ coreutils \
13+ curl \
14+ expect \
15+ lib32gcc1 \
16+ lib32ncurses5-dev \
17+ lib32stdc++6 \
18+ lib32z1 \
19+ libc6-i386 \
20+ pv \
21+ unzip \
22+ wget && \
23+ apt-get clean && \
24+ rm -rf /var/cache/apt/* && \
25+ rm -rf /var/lib/apt/lists/* && \
26+ rm -rf /tmp/* && \
27+ rm -rf /var/tmp/*
28+
29+ RUN \
30+ wget -O /opt/android-studio-ide.tar.gz $ANDROID_STUDIO_URL && \
31+ export sha="$(sha256sum /opt/android-studio-ide.tar.gz)" ; \
32+ if [ "$sha" != "139d0dbb4909353b68fbf55c09b6d31a34512044a9d4f02ce0f1a9accca128f9 /opt/android-studio-ide.tar.gz" ]; then \
33+ echo "SHA-256 Checksum mismatch, aborting installation" ; \
34+ rm -f /opt/android-studio-ide.tar.gz; exit 1; \
35+ else \
36+ cd /opt && tar xf android-studio-ide.tar.gz && rm android-studio-ide.tar.gz; \
37+ fi
38+
39+ # fix display resolution
40+ RUN \
41+ sed -i 's/1920x1080/1280x720/' /usr/bin/start-vnc-session.sh
42+
43+ USER gitpod
44+
45+ RUN \
46+ mkdir -p $HOME/.local/bin && \
47+ printf '\n PATH=$HOME/.local/bin:$PATH\n ' | \
48+ tee -a /home/gitpod/.bashrc && \
49+ ln -s /opt/android-studio/bin/studio.sh \
50+ /home/gitpod/.local/bin/android_studio && \
51+ : "if running locally (vs using gitpod in cloud) need to create /workspace " && \
52+ sudo mkdir -p /workspace/.gradle && \
53+ sudo chown -R gitpod:gitpod /workspace
54+
55+ ARG ANDROID_INSTALLATION_URL=https://github.com/phlummox/android-studio-docker/releases/download/v0.1/android-studio-installation.tar.xz
56+
57+ RUN \
58+ cd $HOME && \
59+ wget -O - $ANDROID_INSTALLATION_URL | tar x --xz
0 commit comments