This repository has been archived by the owner on Mar 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Showing
10 changed files
with
199 additions
and
0 deletions.
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,24 @@ | ||
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.qq.office/deepin.com.qq.office_2.0.0deepin4_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 | ||
ENTRYPOINT ["/app/docker-entrypoint.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
参考:[[Docker][deepin-wine]QQ运行](https://container-automation.readthedocs.io/zh_CN/latest/docker/gui/[Docker][deepin-wine]QQ运行.html) |
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,14 @@ | ||
#!/usr/bin/env xdg-open | ||
|
||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Type=Application | ||
X-Created-By=Deepin WINE Team | ||
Categories=chat; | ||
Icon=deepin.com.qq.office | ||
Exec=/usr/local/bin/tim | ||
Name=TIM | ||
Name[zh_CN]=TIM | ||
Comment=Tencent TIM Client on Deepin Wine | ||
StartupWMClass=TIM.exe | ||
MimeType= |
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,28 @@ | ||
#!/bin/bash | ||
|
||
if [ "$(id -u)" -eq '0' ] | ||
then | ||
UID=${UID:-9001} | ||
GID=${GID:-9001} | ||
AUDIO_GID=${AUDIO_GID:-9002} | ||
VIDEO_GID=${VIDEO_GID:-9003} | ||
|
||
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 | ||
|
||
APP="TIM" | ||
APP_NAME="TIM.exe" | ||
|
||
/opt/deepinwine/apps/Deepin-${APP}/run.sh > /dev/null 2>&1 | ||
sleep 30s | ||
|
||
while test -n "`pidof ${APP_NAME}`" | ||
do | ||
sleep 1s | ||
done | ||
exit "$?" |
14 changes: 14 additions & 0 deletions
14
dockerfiles/tim/hicolor/16x16/apps/deepin.com.qq.office.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions
14
dockerfiles/tim/hicolor/24x24/apps/deepin.com.qq.office.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions
14
dockerfiles/tim/hicolor/32x32/apps/deepin.com.qq.office.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions
14
dockerfiles/tim/hicolor/48x48/apps/deepin.com.qq.office.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions
14
dockerfiles/tim/hicolor/64x64/apps/deepin.com.qq.office.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,61 @@ | ||
#!/bin/bash | ||
|
||
APP="TIM" | ||
CONTAINER="tim" | ||
|
||
IMAGE="zjzstu/${CONTAINER}:latest" | ||
HOST_STORAGE="${HOME}/deepin-wine/Tencent Files" | ||
CONTAINER_STORAGE="/home/user/Tencent Files" | ||
|
||
HOST_CONFIGURE="${HOME}/.deepinwine/Deepin-${APP}" | ||
CONTAINER_CONFIGURE="/home/user/.deepinwine/Deepin-${APP}" | ||
|
||
APP_COMMAND="/opt/deepinwine/apps/Deepin-${APP}/run.sh" | ||
|
||
function startup() | ||
{ | ||
docker run \ | ||
--device=/dev/snd:/dev/snd \ | ||
--device=/dev/video0:/dev/video0 \ | ||
--privileged \ | ||
-v /tmp/.X11-unix:/tmp/.X11-unix \ | ||
--privileged \ | ||
-e DISPLAY=unix${DISPLAY} \ | ||
-e AUDIO_GID=`getent group audio | cut -d: -f3` \ | ||
-e VIDEO_GID=`getent group video | cut -d: -f3` \ | ||
-e GID=`id -g` \ | ||
-e UID=`id -u` \ | ||
-e XMODIFIERS="@im=fcitx" \ | ||
-e QT_IM_MODULE="fcitx" \ | ||
-e GTK_IM_MODULE="fcitx" \ | ||
-v "${HOST_STORAGE}":"${CONTAINER_STORAGE}" \ | ||
-v "${HOST_CONFIGURE}":"${CONTAINER_CONFIGURE}" \ | ||
--name ${CONTAINER} \ | ||
-d ${IMAGE} > /dev/null 2>&1 | ||
} | ||
|
||
function run() | ||
{ | ||
xhost + > /dev/null 2>&1 | ||
|
||
START=$(docker ps -q --filter="name=${CONTAINER}") | ||
STOP=$(docker ps -aq --filter="name=${CONTAINER}") | ||
|
||
if [ -n "${START}" ] | ||
then | ||
docker exec -d -u user $START ${APP_COMMAND} > /dev/null 2>&1 | ||
elif [ -n "${STOP}" ] | ||
then | ||
docker restart ${STOP} > /dev/null 2>&1 | ||
else | ||
startup | ||
fi | ||
} | ||
|
||
function main() | ||
{ | ||
run | ||
exit "$?" | ||
} | ||
|
||
main |