This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77d81c7
commit 0431731
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM debian:buster | ||
|
||
# install apt dependencies | ||
RUN apt-get update -y | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y locales chromium=90.0.4430.212-1~deb10u1 chromium-driver=90.0.4430.212-1~deb10u1 python3 python3-pip python-websockify git xorg vnc4server autocutsel lxde-core novnc | ||
RUN pip3 install --upgrade pip | ||
|
||
RUN sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
dpkg-reconfigure --frontend=noninteractive locales && \ | ||
update-locale LANG=de_DE.UTF-8 | ||
|
||
ENV LANG de_DE.UTF-8 | ||
|
||
WORKDIR /app | ||
|
||
ENV VACCIPY_CHROMEDRIVER="/usr/bin/chromedriver" | ||
|
||
# copy whole folder into container | ||
COPY . . | ||
|
||
RUN pip3 install -r requirements.txt | ||
|
||
# setup vnc | ||
RUN echo "# XScreenSaver Preferences File\nmode: off\nselected: -1" > /root/.xscreensaver && \ | ||
cat /root/.xscreensaver && mkdir /root/.vnc/ && \ | ||
echo "#!/bin/sh\n/usr/bin/autocutsel -s CLIPBOARD -fork\nxrdb $HOME/.Xresources\nxsetroot -solid grey\n#x-terminal-emulator -geometry 80x24+10+10 -ls -title \"$VNCDESKTOP Desktop\" &\n#x-window-manager &\n# Fix to make GNOME work\nexport XKL_XMODMAP_DISABLE=1\n/etc/X11/Xsession &\nx-terminal-emulator -e \"python3 /app/main.py search -f /app/kontaktdaten.json 2>&1 | tee /app/vaccipy\"" > /root/.vnc/xstartup && \ | ||
chmod +x /root/.vnc/xstartup && \ | ||
cat /root/.vnc/xstartup && \ | ||
mv /usr/share/novnc/vnc.html /usr/share/novnc/index.html && \ | ||
echo "#!/bin/bash\nsetxkbmap -option lv3:rwin_switch\necho -n \${VNC_PASSWORD:-vaccipy} | vncpasswd -f > /root/.vnc/passwd\nchmod 400 ~/.vnc/passwd\n\nexport USER=root\nvncserver -localhost no :1 -geometry 1920x1080 -depth 24 -rfbport \${VNC_PORT:-5901} && websockify -D --web=/usr/share/novnc/ \${WEB_PORT:-6901} localhost:\${VNC_PORT:-5901} \ntail -f /app/vaccipy" > /root/vnc-startup.sh && \ | ||
chmod +x /root/vnc-startup.sh && \ | ||
cat /root/vnc-startup.sh && \ | ||
chmod go-rwx /root/.vnc | ||
|
||
CMD ["/root/vnc-startup.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters