-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
47 lines (36 loc) · 2.11 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
46
47
FROM alpine:3.16
LABEL maintainer="Don <[email protected]>"
RUN apk add --no-cache sudo git xfce4 faenza-icon-theme bash python3 tigervnc xfce4-terminal firefox cmake wget \
pulseaudio xfce4-pulseaudio-plugin pavucontrol pulseaudio-alsa alsa-plugins-pulse alsa-lib-dev nodejs npm \
build-base \
&& adduser -h /home/alpine -s /bin/bash -S -D alpine && echo -e "alpine\nalpine" | passwd alpine \
&& echo 'alpine ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& git clone https://github.com/novnc/noVNC /opt/noVNC \
&& git clone https://github.com/novnc/websockify /opt/noVNC/utils/websockify \
&& wget https://raw.githubusercontent.com/novaspirit/Alpine_xfce4_noVNC/dev/script.js -O /opt/noVNC/script.js \
&& wget https://raw.githubusercontent.com/novaspirit/Alpine_xfce4_noVNC/dev/audify.js -O /opt/noVNC/audify.js \
&& wget https://raw.githubusercontent.com/sokumon/flashdesk_vnc/master/web.html -O /opt/noVNC/vnc.html \
&& wget https://raw.githubusercontent.com/sokumon/flashdesk_vnc/master/style.css -O /opt/noVNC/style.css \
&& wget https://raw.githubusercontent.com/sokumon/flashdesk_vnc/master/index.js -O /opt/noVNC/index.js \
&& wget https://raw.githubusercontent.com/sokumon/flashdesk_vnc/master/avatar.js -O /opt/noVNC/avatar.js \
&& wget https://raw.githubusercontent.com/novaspirit/Alpine_xfce4_noVNC/dev/pcm-player.js -O /opt/noVNC/pcm-player.js
RUN npm install --prefix /opt/noVNC ws
RUN npm install --prefix /opt/noVNC audify
USER alpine
WORKDIR /home/alpine
RUN mkdir -p /home/alpine/.vnc \
&& echo -e "-Securitytypes=none" > /home/alpine/.vnc/config \
&& echo -e "#!/bin/bash\nstartxfce4 &" > /home/alpine/.vnc/xstartup \
&& echo -e "alpine\nalpine\nn\n" | vncpasswd
USER root
RUN echo '\
#!/bin/bash \
/usr/bin/vncserver :99 2>&1 | sed "s/^/[Xtigervnc ] /" & \
sleep 1 & \
/usr/bin/pulseaudio 2>&1 | sed "s/^/[pulseaudio] /" & \
sleep 1 & \
/usr/bin/node /opt/noVNC/audify.js 2>&1 | sed "s/^/[audify ] /" & \
/opt/noVNC/utils/novnc_proxy --vnc localhost:5999 2>&1 | sed "s/^/[noVNC ] /"'\
>/entry.sh
USER alpine
ENTRYPOINT [ "/bin/bash", "/entry.sh" ]