proti0070 commited on
Commit
f660c5e
·
verified ·
1 Parent(s): 942907f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +121 -84
Dockerfile CHANGED
@@ -3,97 +3,134 @@ FROM ubuntu:22.04
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV HOSTNAME=xro
5
 
6
- # ---- Base packages ----
7
- RUN apt-get update && apt-get install -y \
8
- ca-certificates \
9
- curl \
10
- wget \
11
- git \
12
- sudo \
13
- htop \
14
- btop \
15
- neovim \
16
- nano \
17
- lsof \
18
- tmux \
19
- screen \
20
- unzip \
21
- zip \
22
- python3 \
23
- python3-pip \
24
- libxtst6 \
25
- libxrender1 \
26
- libxi6 \
27
- libxext6 \
28
- libx11-6 \
29
- libxrandr2 \
30
- libxfixes3 \
31
- libxcursor1 \
32
- libxcomposite1 \
33
- libxdamage1 \
34
- libxss1 \
35
- libglib2.0-0 \
36
- libgtk-3-0 \
37
- libatk1.0-0 \
38
- fonts-dejavu \
39
- fonts-liberation \
40
- xvfb \
41
- x11vnc \
42
- novnc \
43
- websockify \
44
- openbox \
45
- xterm \
46
- openjdk-17-jdk \
47
- gradle \
48
- && rm -rf /var/lib/apt/lists/*
49
-
50
- # ---- Android SDK ----
51
- RUN mkdir -p /opt/android-sdk/cmdline-tools && \
52
- wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip \
53
- -O /tmp/cmdtools.zip && \
54
- unzip /tmp/cmdtools.zip -d /opt/android-sdk/cmdline-tools && \
55
- mv /opt/android-sdk/cmdline-tools/cmdline-tools /opt/android-sdk/cmdline-tools/latest && \
56
- rm /tmp/cmdtools.zip
 
 
 
 
 
 
 
 
 
 
57
 
58
  ENV ANDROID_HOME=/opt/android-sdk
59
  ENV ANDROID_SDK_ROOT=/opt/android-sdk
60
  ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools
61
 
62
- # ---- Full SDK install ----
63
- RUN yes | sdkmanager --licenses && \
64
- sdkmanager \
65
- "platform-tools" \
66
- "platforms;android-34" \
67
- "platforms;android-33" \
68
- "platforms;android-32" \
69
- "platforms;android-31" \
70
- "platforms;android-30" \
71
- "platforms;android-29" \
72
- "platforms;android-28" \
73
- "build-tools;34.0.0" \
74
- "build-tools;33.0.2" \
75
- "build-tools;32.0.0" \
76
- "build-tools;31.0.0" \
77
- "build-tools;30.0.3" \
78
- "sources;android-34" \
79
- "sources;android-33" \
80
- "extras;android;m2repository" \
81
- "extras;google;m2repository" \
82
- "extras;google;google_play_services" \
83
- "cmake;3.22.1" \
84
- "ndk;25.2.9519653" \
85
- "ndk;26.1.10909125"
86
-
87
- # ---- Android Studio ----
88
- RUN wget -q https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2023.3.1.18/android-studio-2023.3.1.18-linux.tar.gz \
89
- -O /tmp/android-studio.tar.gz && \
90
- tar -xzf /tmp/android-studio.tar.gz -C /opt/ && \
91
- rm /tmp/android-studio.tar.gz
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
  ENV PATH=$PATH:/opt/android-studio/bin
94
 
95
- # ---- noVNC index fix ----
96
- RUN ln -s /usr/share/novnc/vnc.html /usr/share/novnc/index.html 2>/dev/null || true
 
 
 
 
 
97
 
98
  WORKDIR /workspace
99
 
@@ -102,4 +139,4 @@ RUN chmod +x /start.sh
102
 
103
  EXPOSE 7860
104
 
105
- CMD ["/start.sh"]
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV HOSTNAME=xro
5
 
6
+ # -----------------------------
7
+
8
+ # Base packages
9
+
10
+ # -----------------------------
11
+
12
+ RUN apt-get update && apt-get install -y
13
+ ca-certificates
14
+ curl
15
+ wget
16
+ git
17
+ sudo
18
+ htop
19
+ btop
20
+ neovim
21
+ nano
22
+ lsof
23
+ tmux
24
+ screen
25
+ unzip
26
+ zip
27
+ python3
28
+ python3-pip
29
+ libxtst6
30
+ libxrender1
31
+ libxi6
32
+ libxext6
33
+ libx11-6
34
+ libxrandr2
35
+ libxfixes3
36
+ libxcursor1
37
+ libxcomposite1
38
+ libxdamage1
39
+ libxss1
40
+ libglib2.0-0
41
+ libgtk-3-0
42
+ libatk1.0-0
43
+ fonts-dejavu
44
+ fonts-liberation
45
+ xvfb
46
+ x11vnc
47
+ novnc
48
+ websockify
49
+ openbox
50
+ xterm
51
+ openjdk-17-jdk
52
+ gradle
53
+ && rm -rf /var/lib/apt/lists/*
54
+
55
+ # -----------------------------
56
+
57
+ # Android SDK
58
+
59
+ # -----------------------------
60
+
61
+ RUN mkdir -p /opt/android-sdk/cmdline-tools &&
62
+ wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
63
+ -O /tmp/cmdtools.zip &&
64
+ unzip /tmp/cmdtools.zip -d /opt/android-sdk/cmdline-tools &&
65
+ mv /opt/android-sdk/cmdline-tools/cmdline-tools /opt/android-sdk/cmdline-tools/latest &&
66
+ rm /tmp/cmdtools.zip
67
 
68
  ENV ANDROID_HOME=/opt/android-sdk
69
  ENV ANDROID_SDK_ROOT=/opt/android-sdk
70
  ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools
71
 
72
+ # -----------------------------
73
+
74
+ # Accept licenses
75
+
76
+ # -----------------------------
77
+
78
+ RUN yes | sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses
79
+
80
+ # -----------------------------
81
+
82
+ # Install SDKs (NEW + OLD)
83
+
84
+ # -----------------------------
85
+
86
+ RUN sdkmanager
87
+ "platform-tools"
88
+
89
+ "platforms;android-34"
90
+ "platforms;android-33"
91
+ "platforms;android-30"
92
+ "platforms;android-29"
93
+ "platforms;android-28"
94
+ "platforms;android-26"
95
+ "platforms;android-24"
96
+ "platforms;android-23"
97
+ "platforms;android-21"
98
+
99
+ "build-tools;34.0.0"
100
+ "build-tools;33.0.2"
101
+ "build-tools;30.0.3"
102
+ "build-tools;29.0.3"
103
+ "build-tools;28.0.3"
104
+
105
+ "sources;android-34"
106
+ "sources;android-30"
107
+
108
+ "cmake;3.22.1"
109
+
110
+ "ndk;26.1.10909125"
111
+ "ndk;23.2.8568313"
112
+ "ndk;21.4.7075529"
113
+
114
+ # -----------------------------
115
+
116
+ # Android Studio
117
+
118
+ # -----------------------------
119
+
120
+ RUN wget -q https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2023.3.1.18/android-studio-2023.3.1.18-linux.tar.gz
121
+ -O /tmp/android-studio.tar.gz &&
122
+ tar -xzf /tmp/android-studio.tar.gz -C /opt/ &&
123
+ rm /tmp/android-studio.tar.gz
124
 
125
  ENV PATH=$PATH:/opt/android-studio/bin
126
 
127
+ # -----------------------------
128
+
129
+ # noVNC fix
130
+
131
+ # -----------------------------
132
+
133
+ RUN ln -s /usr/share/novnc/vnc.html /usr/share/novnc/index.html || true
134
 
135
  WORKDIR /workspace
136
 
 
139
 
140
  EXPOSE 7860
141
 
142
+ CMD ["/start.sh"]