Skip to content

Commit 7309230

Browse files
committed
docker~~~
1 parent f4273f0 commit 7309230

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

docker/Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM ubuntu:21.10
2+
3+
RUN apt-get update -y && apt-get install -y wget procps psmisc xvfb x11vnc fluxbox
4+
5+
RUN dpkg --add-architecture i386 \
6+
&& wget -nc https://dl.winehq.org/wine-builds/winehq.key -O /usr/share/keyrings/winehq-archive.key \
7+
&& wget -nc https://dl.winehq.org/wine-builds/ubuntu/dists/impish/winehq-impish.sources -P /etc/apt/sources.list.d/ \
8+
&& apt-get update -y && apt-get install -y winehq-staging
9+
10+
RUN apt-get update -y && apt-get install -y libgnutls30:i386 libgpg-error0:i386 libsqlite3-0:i386 winbind
11+
12+
RUN wget "https://www.battle.net/download/getInstallerForGame?os=win&gameProgram=HEROES_OF_THE_STORM&version=Live&id=undefined" -O hots-installer.exe
13+
14+
ENV DISPLAY :99
15+
COPY start-xvfb.sh .
16+
RUN chmod +x start-xvfb.sh
17+
18+
RUN mkdir ~/.fluxbox && cp ./etc/X11/fluxbox/keys ~/.fluxbox/keys && echo $'\n\
19+
OnWindow Mod4 Mouse1 :MacroCmd {Raise} {Focus} {StartMoving}\n\
20+
OnWindow Mod4 Mouse3 :MacroCmd {Raise} {Focus} {StartResizing NearestCorner}\n\
21+
' >> ~/.fluxbox/keys
22+
23+
RUN ./start-xvfb.sh wine ./hots-installer.exe
24+
RUN cp -r /root/.wine/drive_c/Program\ Files\ \(x86\)/Heroes\ of\ the\ Storm/Support64/* /root/.wine/drive_c/windows/system32/
25+
26+
EXPOSE 5900
27+
ENV VNCPASSWD=
28+
ENV WINEDLLOVERRIDES="nvapi,nvapi64="
29+
CMD ./start-xvfb.sh wine /root/.wine/drive_c/Program\ Files\ \(x86\)/Battle.net/Battle.net.exe

docker/start-xvfb.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
Xvfb $DISPLAY -screen 0 1024x768x16 &
3+
sleep 1
4+
5+
fluxbox &
6+
sleep 1
7+
8+
if [ -n "$VNCPASSWD" ]; then
9+
x11vnc -storepasswd "$VNCPASSWD" /etc/x11vnc.pass
10+
x11vnc -display $DISPLAY -bg -forever -rfbauth /etc/x11vnc.pass -quiet -listen 0.0.0.0 -xkb &
11+
else
12+
x11vnc -display $DISPLAY -bg -forever -nopw -quiet -listen 0.0.0.0 -xkb &
13+
fi
14+
15+
sleep 2
16+
echo "##############################################"
17+
echo "Run 'vncviewer localhost:5900' to connect"
18+
echo "##############################################"
19+
sleep 4
20+
21+
"$@"
22+
23+
while pgrep wineserver; do
24+
sleep 2
25+
done
26+
27+
killall Xvfb
28+
rm -rf /tmp/.X*

0 commit comments

Comments
 (0)