first commit
This commit is contained in:
commit
72dd4dab33
72
Dockerfile
Normal file
72
Dockerfile
Normal file
@ -0,0 +1,72 @@
|
||||
FROM ubuntu:jammy
|
||||
|
||||
LABEL maintainer="lxh@cxh.cn"
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai > /etc/timezone
|
||||
|
||||
# 安装必要的工具
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y software-properties-common && \
|
||||
apt-get install -y wget && \
|
||||
apt-get install -y unzip && \
|
||||
apt-get install -y git && \
|
||||
apt-get install -y curl && \
|
||||
apt-get install -y vim && \
|
||||
apt-get install -y sudo && \
|
||||
apt-get install -y net-tools
|
||||
|
||||
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y supervisor && \
|
||||
apt-get install -y xvfb && \
|
||||
apt-get install -y x11vnc && \
|
||||
apt-get install -y fluxbox && \
|
||||
apt-get install -y novnc && \
|
||||
apt-get install -y xdotool
|
||||
|
||||
# 设置 VNC 密码
|
||||
RUN mkdir ~/.vnc && x11vnc -storepasswd vncpass ~/.vnc/passwd
|
||||
|
||||
RUN apt-get install -y ttf-wqy-microhei locales procps \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& sed -ie 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/g' /etc/locale.gen \
|
||||
&& locale-gen
|
||||
|
||||
# 安装 wine
|
||||
RUN dpkg --add-architecture i386 && \
|
||||
apt-get full-upgrade -y && \
|
||||
wget -nc https://dl.winehq.org/wine-builds/winehq.key && \
|
||||
apt-key add winehq.key && \
|
||||
apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main' && \
|
||||
apt-get update -y && \
|
||||
apt-get install -y --install-recommends winehq-stable && \
|
||||
wine --version
|
||||
|
||||
ENV DISPLAY_WIDTH=1280 \
|
||||
DISPLAY_HEIGHT=720 \
|
||||
DISPLAY=:0.0 \
|
||||
LANG=zh_CN.UTF-8 \
|
||||
LANGUAGE=zh_CN.UTF-8 \
|
||||
LC_ALL=zh_CN.UTF-8 \
|
||||
WINEPREFIX=/home/app/.wine
|
||||
|
||||
|
||||
COPY etc/ /etc/
|
||||
|
||||
|
||||
RUN useradd -m app && usermod -aG sudo app && echo 'app ALL=(ALL) NOPASSWD:ALL' >> //etc/sudoers
|
||||
|
||||
USER app
|
||||
WORKDIR /home/app
|
||||
|
||||
# COPY install-wine-mono.sh ./
|
||||
|
||||
# RUN bash -c 'sudo -E supervisord -c /etc/supervisord.conf -l /var/log/supervisord.log &' && \
|
||||
# sleep 5 && \
|
||||
# sudo chown -R app:app ./install-wine-mono.sh && \
|
||||
# ./install-wine-mono.sh && \
|
||||
# sudo rm -rf ./install-wine-mono.sh
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
CMD ["/entrypoint.sh"]
|
2
entrypoint.sh
Normal file
2
entrypoint.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
sudo -E supervisord -c /etc/supervisord.conf -l /var/log/supervisord.log
|
5
etc/supervisord.conf
Normal file
5
etc/supervisord.conf
Normal file
@ -0,0 +1,5 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[include]
|
||||
files = /etc/supervisord.d/*.conf
|
6
etc/supervisord.d/fluxbox.conf
Normal file
6
etc/supervisord.d/fluxbox.conf
Normal file
@ -0,0 +1,6 @@
|
||||
[program:fluxbox]
|
||||
command=/usr/bin/fluxbox
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
13
etc/supervisord.d/x11vnc.conf
Normal file
13
etc/supervisord.d/x11vnc.conf
Normal file
@ -0,0 +1,13 @@
|
||||
[program:X11]
|
||||
command=/usr/bin/Xvfb :0 -screen 0 1024x768x24
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
||||
|
||||
[program:x11vnc]
|
||||
command=/usr/bin/x11vnc -noxrecord
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
28
install-wine-mono.sh
Normal file
28
install-wine-mono.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
function skipsomething() {
|
||||
LAST="1"
|
||||
while :
|
||||
do
|
||||
xdotool search "$@"
|
||||
NOTFOUND=$?
|
||||
if [ "$LAST" == "0" ] && [ "$NOTFOUND" == "1" ]; then
|
||||
break
|
||||
fi
|
||||
echo "[skipsomething] find $@ : $NOTFOUND"
|
||||
if [ "$NOTFOUND" == "0" ]; then
|
||||
sleep 3
|
||||
xdotool key Tab
|
||||
sleep 0.5
|
||||
xdotool key Return
|
||||
fi
|
||||
LAST=$NOTFOUND
|
||||
sleep 0.2
|
||||
done
|
||||
}
|
||||
wget https://dl.winehq.org/wine/wine-mono/9.0.0/wine-mono-9.0.0-x86.msi
|
||||
wine msiexec /i wine-mono-9.0.0-x86.msi &
|
||||
sleep 10
|
||||
skipsomething "wine"
|
||||
wait
|
||||
sleep 5
|
||||
rm wine-mono-9.0.0-x86.msi
|
Loading…
Reference in New Issue
Block a user