-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
167 lines (149 loc) · 4.68 KB
/
Dockerfile
File metadata and controls
167 lines (149 loc) · 4.68 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
FROM alexanderwagnerdev/ubuntu:24.04
ARG VNC_PASS=OBS1234!
ARG LOCALE=en_US.UTF-8
ARG TZ=UTC
ARG KEYBOARD_LAYOUT=us
ENV VNC_PASS=${VNC_PASS}
ENV LOCALE=${LOCALE}
ENV TZ=${TZ}
ENV LANG=${LOCALE}
ENV KEYBOARD_LAYOUT=${KEYBOARD_LAYOUT}
ENV LANGUAGE=${LOCALE%%_*}:${LOCALE%%.*}
ENV LC_ALL=${LOCALE}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
software-properties-common wget curl git gnupg \
xwayland x11vnc xvfb x11-xkb-utils \
lxqt-core lxqt-session lxqt-panel lxqt-runner lxqt-config \
pcmanfm-qt qterminal \
websockify novnc \
ffmpeg firefox chromium-browser python3-pip vlc vlc-l10n v4l2loopback-dkms \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools \
gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-pulseaudio \
mesa-utils libgl1-mesa-dri \
fonts-dejavu fonts-noto fonts-freefont-ttf fonts-liberation fonts-roboto fonts-ubuntu fontconfig \
dbus-x11 \
openbox \
pulseaudio pulseaudio-utils pavucontrol \
locales \
iproute2 \
nano vim htop net-tools iputils-ping \
sudo \
cron \
&& add-apt-repository -y ppa:obsproject/obs-studio \
&& apt-get update \
&& apt-get install -y obs-studio \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* /tmp/* /var/tmp/*
RUN sed -i '/^#.*/s/^# //' /etc/locale.gen && \
locale-gen && \
update-locale LANG=${LOCALE}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN useradd -m -s /bin/bash -u 1500 obsuser && \
echo "obsuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
mkdir -p /home/obsuser/.config/obs-studio && \
chown -R obsuser:obsuser /home/obsuser
RUN mkdir -p /home/obsuser/.local/share/applications
RUN cat > /home/obsuser/.local/share/applications/firefox.desktop << 'EOF'
[Desktop Entry]
Name=Firefox Web Browser
Comment=Browse the World Wide Web
Exec=firefox %u
Icon=firefox
Terminal=false
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;
EOF
RUN cat > /home/obsuser/.local/share/applications/chromium.desktop << 'EOF'
[Desktop Entry]
Name=Chromium Web Browser
Comment=Access the Internet
Exec=chromium-browser %U
Icon=chromium-browser
Terminal=false
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
EOF
RUN cat > /home/obsuser/.local/share/applications/vlc.desktop << 'EOF'
[Desktop Entry]
Name=VLC Media Player
Comment=Read, capture, broadcast your multimedia streams
Exec=vlc %U
Icon=vlc
Terminal=false
Type=Application
Categories=AudioVideo;Player;Recorder;
MimeType=video/mpeg;video/x-mpeg;video/x-msvideo;video/quicktime;video/x-ms-asf;video/x-ms-wmv;video/x-matroska;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;
EOF
RUN cat > /home/obsuser/.local/share/applications/pavucontrol.desktop << 'EOF'
[Desktop Entry]
Name=PulseAudio Volume Control
Comment=Adjust the volume level
Exec=pavucontrol
Icon=multimedia-volume-control
Terminal=false
Type=Application
Categories=AudioVideo;Audio;Mixer;GTK;
EOF
RUN mkdir -p /home/obsuser/.config/autostart && \
cat > /home/obsuser/.config/autostart/obs.desktop << 'EOF'
[Desktop Entry]
Type=Application
Name=OBS Studio
Exec=obs
X-LXQt-Need-Tray=false
EOF
RUN mkdir -p /home/obsuser/.config/openbox && \
cat > /home/obsuser/.config/openbox/menu.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="Openbox 3">
<item label="Terminal">
<action name="Execute">
<command>qterminal</command>
</action>
</item>
<item label="Firefox">
<action name="Execute">
<command>firefox</command>
</action>
</item>
<item label="Chromium">
<action name="Execute">
<command>chromium-browser</command>
</action>
</item>
<item label="File Manager">
<action name="Execute">
<command>pcmanfm-qt</command>
</action>
</item>
<item label="VLC">
<action name="Execute">
<command>vlc</command>
</action>
</item>
<item label="Audio Mixer">
<action name="Execute">
<command>pavucontrol</command>
</action>
</item>
<separator />
<item label="Exit">
<action name="Exit" />
</item>
</menu>
</openbox_menu>
EOF
RUN chown -R obsuser:obsuser /home/obsuser/.config /home/obsuser/.local
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
USER obsuser
WORKDIR /home/obsuser
EXPOSE 5900 6080
HEALTHCHECK CMD curl --fail http://localhost:6080/ || exit 1
CMD ["/entrypoint.sh"]