-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
45 lines (35 loc) · 1.51 KB
/
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
FROM ghcr.io/linuxserver/baseimage-kasmvnc:alpine317
# Install necessary tools and dependencies
RUN apk update && apk add --no-cache \
android-tools \
openjdk17 \
wget
RUN wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2024.1.1.11/android-studio-2024.1.1.11-linux.tar.gz -O /tmp/android-studio.tar.gz \
&& mkdir -p /opt/android-studio \
&& tar -xvzf /tmp/android-studio.tar.gz -C /opt/android-studio --strip-components=1 \
&& rm /tmp/android-studio.tar.gz
RUN mkdir -p /defaults /config \
&& echo "/opt/android-studio/bin/studio.sh" > /defaults/autostart
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk
ENV TITLE="Android Studio"
ENV HOME=/config
# Configure Openbox to remove window decorations for Android Studio
RUN mkdir -p /config/.config/openbox \
&& echo '<?xml version="1.0" encoding="UTF-8"?> \
<openbox_config> \
<applications> \
<application type="normal" class="jetbrains-studio"> \
<decor>no</decor> \
<fullscreen>yes</fullscreen> \
</application> \
</applications> \
</openbox_config>' > /config/.config/openbox/rc.xml
# Add security settings for opening links
RUN apk add --no-cache chromium \
&& mkdir -p /config/.config/chromium \
&& echo "user_pref('network.protocol-handler.warn-external-default', true);" > /config/.config/chromium/prefs.js
# Enable nested virtualization
RUN apk add --no-cache qemu qemu-system-x86_64 \
&& echo "options kvm_intel nested=1" > /etc/modprobe.d/kvm_intel.conf
# Initialize the container
CMD ["/init"]