Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
RICwang authored Nov 23, 2024
1 parent 258168e commit 3edb2c6
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,11 @@
FROM jlesage/baseimage-gui:ubuntu-24.04-v4

# 替换APT源为清华源
RUN sed -i 's@/archive.ubuntu.com/@/mirrors.tuna.tsinghua.edu.cn/@g' /etc/apt/sources.list.d/ubuntu.sources \
&& sed -i 's@/security.ubuntu.com/@/mirrors.tuna.tsinghua.edu.cn/ubuntu/@g' /etc/apt/sources.list.d/ubuntu.sources

# 安装必要依赖
RUN apt update && \
apt install -y language-pack-zh-hans fonts-noto-cjk-extra curl \
shared-mime-info desktop-file-utils libxcb1 libxcb-icccm4 libxcb-image0 \
libxcb-keysyms1 libxcb-randr0 libxcb-render0 libxcb-render-util0 libxcb-shape0 \
libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xkb1 libxcb-xinerama0 \
libxcb-xkb1 libxcb-glx0 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 \
libdbus-1-3 libfontconfig1 libgbm1 libgcc1 libgdk-pixbuf2.0-0 libglib2.0-0 \
libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \
libxcomposite1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 \
libxss1 libxtst6 libatomic1 libxcomposite1 libxrender1 libxrandr2 libxkbcommon-x11-0 \
libfontconfig1 libdbus-1-3 libnss3 libx11-xcb1 libasound2t64 && \
# 清理工作
apt clean && \
rm -rf /var/lib/apt/lists/*
ARG BASE_IMAGE
FROM ${BASE_IMAGE}

# 下载微信安装包
RUN curl -O https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_x86_64.deb && \
RUN curl -O "https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_x86_64.deb" && \
dpkg -i WeChatLinux_x86_64.deb 2>&1 | tee /tmp/wechat_install.log && \
rm WeChatLinux_x86_64.deb

# 生成微信图标
RUN APP_ICON_URL=https://res.wx.qq.com/a/wx_fed/assets/res/NTI4MWU5.ico && \
install_app_icon.sh "$APP_ICON_URL"

RUN echo '#!/bin/sh' > /startapp.sh && \
echo 'exec /usr/bin/wechat' >> /startapp.sh && \
chmod +x /startapp.sh
Expand All @@ -37,7 +14,5 @@ VOLUME /root/.xwechat
VOLUME /root/xwechat_files
VOLUME /root/downloads

# 设置应用名称
RUN set-cont-env APP_NAME "Wechat"
# 配置应用版本
# 配置微信版本号
RUN set-cont-env APP_VERSION "$(grep -o 'Unpacking wechat ([0-9.]*)' /tmp/wechat_install.log | sed 's/Unpacking wechat (\(.*\))/\1/')"

0 comments on commit 3edb2c6

Please sign in to comment.