-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-wine
More file actions
executable file
·45 lines (41 loc) · 1.32 KB
/
Copy pathdocker-wine
File metadata and controls
executable file
·45 lines (41 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
branch=$(echo $branch | perl -pe 's/\//-/g')
branch=$(echo -$branch)
branch=$(echo $branch | perl -pe 's/-master//')
case $1 in
--rm)
echo "Auto-removing volume container 'winehome${branch}' after completing action..."
shift
$0 "$@"
exitcode=$?
docker volume rm winehome${branch} 2>&1 >/dev/null
echo "Removed 'winehome${branch}' volume container"
exit $exitcode
;;
--help)
echo "Usage: $0 [--rm] [command] [arguments]..."
echo "e.g."
echo " $0"
echo " $0 --rm"
echo " $0 wineboot --init"
echo " $0 --rm wine explorer.exe"
exit 0
;;
esac
if ! docker volume ls -qf "name=winehome${branch}" | grep -q "winehome${branch}"; then
echo "Creating volume container 'winehome${branch}'..."
docker volume create winehome${branch}
else
echo "Using existing volume container 'winehome${branch}'..."
fi
docker run -it \
--rm \
-e DISPLAY=${DISPLAY} \
-v ~/.Xauthority:/home/wine/.Xauthority \
-v winehome${branch}:/home/wine \
-v ~/flowgorithm_data:/home/wine/data \
--net="host" \
--name="wine${branch}" \
palzer/flowgorithm-docker${branch} $*
#--volume="$HOME/.Xauthority:/root/.Xauthority:ro" \