diff --git a/Dockerfile b/Dockerfile index ab460ce..5d4806a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,27 +6,15 @@ RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shangh # 安装必要的工具 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 + apt-get install -y software-properties-common wget unzip git curl vim sudo 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 apt-get install -y supervisor xvfb x11vnc fluxbox novnc 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 \ @@ -42,6 +30,7 @@ RUN dpkg --add-architecture i386 && \ apt-get install -y --install-recommends winehq-stable && \ wine --version +# 配置运行环境等信息 ENV DISPLAY_WIDTH=1280 \ DISPLAY_HEIGHT=720 \ DISPLAY=:0.0 \ @@ -50,22 +39,23 @@ ENV DISPLAY_WIDTH=1280 \ 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 ./ +# 安装wine-mono +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 +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