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

Commit

Permalink
chore(docker): 更新迅雷使用
Browse files Browse the repository at this point in the history
  • Loading branch information
zjZSTU committed Oct 10, 2019
1 parent 6569cf0 commit 27b29c6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/thunder/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ then
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
Expand Down
33 changes: 17 additions & 16 deletions dockerfiles/thunder/thunder.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/bin/bash

APP="ThunderSpeed"
COMMAND="/opt/deepinwine/apps/Deepin-${APP}/run.sh"
CONTAINER_NAME="thunder"
IMAGE_NAME="zjzstu/thunder:latest"
CONTAINER="thunder"

HOST_FILE_DIR="${HOME}/deepin-wine/${APP} Files"
CONTAINER_FILE_DIR="/home/user/${APP} Files"
IMAGE="zjzstu/${CONTAINER}:latest"
HOST_STORAGE="${HOME}/deepin-wine/${APP} Files"
CONTAINER_STORAGE="/home/user/${APP} Files"

HOST_CONFIGURE="${HOME}/.deepinwine/Deepin-${APP}"
CONTAINER_CONFIGURE="/home/user/.deepinwine/Deepin-${APP}"

APP_COMMAND="/opt/deepinwine/apps/Deepin-${APP}/run.sh"

# 启动wechat镜像
function startup()
{
docker run \
Expand All @@ -22,28 +25,26 @@ function startup()
-e XMODIFIERS="@im=fcitx" \
-e QT_IM_MODULE="fcitx" \
-e GTK_IM_MODULE="fcitx" \
-v "${HOST_FILE_DIR}":"${CONTAINER_FILE_DIR}" \
--name ${CONTAINER_NAME} \
-d ${IMAGE_NAME} > /dev/null 2>&1
-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_NAME}")
STOP=$(docker ps -aq --filter="name=${CONTAINER_NAME}")
START=$(docker ps -q --filter="name=${CONTAINER}")
STOP=$(docker ps -aq --filter="name=${CONTAINER}")

echo $START
echo $STOP
if [ -n "${START}" ]
then
docker exec -d -u user $START ${COMMAND} > /dev/null 2>&1
docker exec -d -u user $START ${APP_COMMAND} > /dev/null 2>&1
elif [ -n "${STOP}" ]
then
docker restart ${STOP} > /dev/null 2>&1
else
echo "startup"
startup
fi
}
Expand All @@ -54,4 +55,4 @@ function main()
exit "$?"
}

main
main
10 changes: 4 additions & 6 deletions docs/source/docker/gui/[Docker][deepin-wine]迅雷运行.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@

# [Docker][deepin-wine]迅雷运行

参考:

[[Docker][deepin-wine]微信运行](https://container-automation.readthedocs.io/zh_CN/latest/docker/gui/[Docker][deepin-wine]微信运行.html)

[[Docker][deepin-wine]QQ运行](https://container-automation.readthedocs.io/zh_CN/latest/docker/gui/%5BDocker%5D%5Bdeepin-wine%5DQQ运行.html)
参考:[[Docker][deepin-wine]微信运行](https://container-automation.readthedocs.io/zh_CN/latest/docker/gui/[Docker][deepin-wine]微信运行.html)

迅雷安装包下载地址:[deepin.com.thunderspeed](https://mirrors.aliyun.com/deepin/pool/non-free/d/deepin.com.thunderspeed/)

完整脚本地址:[thunder](https://github.com/zjZSTU/Containerization-Automation/tree/master/dockerfiles/thunder)

迅雷下载地址中`Z`盘表示容器路径,默认下载在`Z:\迅雷下载`,自定义挂载地址
迅雷下载地址中`Z`盘表示容器路径,默认下载在`Z:\迅雷下载`,等同于容器的`/迅雷下载`

当前脚本`thunder.sh`中挂载目录为`/home/user/ThunderSpeed Files`

![](./imgs/thunder.png)

0 comments on commit 27b29c6

Please sign in to comment.