Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Commit

Permalink
feat(docker): wechat镜像构建和使用
Browse files Browse the repository at this point in the history
  • Loading branch information
zjZSTU committed Oct 10, 2019
1 parent 98facde commit f7e5509
Show file tree
Hide file tree
Showing 13 changed files with 457 additions and 1 deletion.
25 changes: 25 additions & 0 deletions dockerfiles/wechat/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM zjzstu/deepin-wine:latest
LABEL maintainer "zhujian <zjzstu@github.com>"

WORKDIR /app
RUN set -eux && \
apt-get update && \
apt-get install -y wget ttf-wqy-microhei gosu dbus && \
gosu nobody true && \
wget https://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.wechat/deepin.com.wechat_2.6.8.65deepin0_i386.deb && \
useradd -s /bin/bash -m user && \
chown -R user:user /app && \
dpkg -i *.deb && \
rm -f *.deb && \
apt-get autoclean -y && apt-get clean -y && \
find /var/lib/apt/lists -type f -delete && \
find /var/cache -type f -delete && \
find /var/log -type f -delete && \
find /usr/share/doc -type f -delete && \
find /usr/share/man -type f -delete

COPY docker-entrypoint.sh ./
RUN chmod a+x docker-entrypoint.sh && \
chown user:user docker-entrypoint.sh && \
ls -al
ENTRYPOINT ["/app/docker-entrypoint.sh"]
14 changes: 14 additions & 0 deletions dockerfiles/wechat/deepin.com.wechat.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env xdg-open

[Desktop Entry]
Encoding=UTF-8
Type=Application
X-Created-By=Deepin WINE Team
Categories=chat;
Icon=deepin.com.wechat
Exec=/usr/local/bin/wechat
Name=WeChat
Name[zh_CN]=微信
Comment=Tencent WeChat Client on Deepin Wine
StartupWMClass=WeChat.exe
MimeType=
25 changes: 25 additions & 0 deletions dockerfiles/wechat/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

if [ "$(id -u)" -eq '0' ]
then
UID=${UID:-9001}
GID=${GID:-9001}
AUDIO_GID=${AUDIO_GID:-9002}
VIDEO_GID=${VIDEO_GID:-9003}
id
usermod -u ${UID} -g ${GID} -a -G root,${AUDIO_GID},${VIDEO_GID} user > /dev/null 2>&1

source dbus start > /dev/null 2>&1
export HOME=/home/user
chown -R ${UID}:${GID} ${HOME} > /dev/null 2>&1
exec gosu user "$0" "$@"
fi

/opt/deepinwine/apps/Deepin-WeChat/run.sh > /dev/null 2>&1
sleep 30s

while test -n "`pidof WeChat.exe`"
do
sleep 1s
done
exit "$?"
27 changes: 27 additions & 0 deletions dockerfiles/wechat/hicolor/16x16/apps/deepin.com.wechat.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions dockerfiles/wechat/hicolor/24x24/apps/deepin.com.wechat.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions dockerfiles/wechat/hicolor/32x32/apps/deepin.com.wechat.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f7e5509

Please sign in to comment.