なんだかんだ言いながら、何とかなったのでそのやり方を
書いていきますね。
まずはdockerコンテナの構築ですね・・・いや、その前に
dockerをインストールしておいてください。
これについては、沢山の人が書いておられるので、それを
参考にすれば問題ないかと思います。
では、dockerコンテナの構築です。
以下を任意のフォルダーに構築してください。例として
Host$ mkdir ~/Docker/wine
Host$ nano ~/Docker/wine/Dockerfile
FROM debian:jessie
MAINTAINER ohsan
ARG DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386
RUN apt-get update -y
RUN apt-get install --no-install-recommends software-properties-common -y
RUN apt-get install -y apt-transport-https wget dbus winbind wine zenity
RUN add-apt-repository -y contrib
RUN add-apt-repository -y non-free
RUN add-apt-repository -y "deb https://dl.winehq.org/wine-builds/debian jessie main"
RUN wget https://dl.winehq.org/wine-builds/Release.key && apt-key add Release.key
RUN apt-get update -y
RUN apt-get install -y --install-recommends winehq-staging cabextract unzip linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-driver nvidia-glx pulseaudio:i386 xvfb
# Japanese Localization
RUN cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
RUN apt-get install locales task-japanese -y
RUN echo "ja_JP.UTF-8" >> /etc/locale.gen && locale-gen
RUN echo "ja_JP.UTF-8" >> ~/.profile
RUN apt-get install fonts-takao sudo -y
RUN echo "XKBMODEL="jp106"" >> /etc/default/keyboard
RUN echo "XKBLAYOUT="jp"" >> /etc/default/keyboard
RUN apt-get purge software-properties-common -y
RUN apt-get autoclean -y
# Replace 1000 with your user / group id
RUN export uid=1000 gid=1000 && \
mkdir -p /home/wineuser && \
echo "wineuser:x:${uid}:${gid}:Developer,,,:/home/wineuser:/bin/bash" >> /etc/passwd && \
echo "wineuser:x:${uid}:" >> /etc/group && \
echo "wineuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/wineuser && \
chmod 0440 /etc/sudoers.d/wineuser && \
chown ${uid}:${gid} -R /home/wineuser
# Xorg Configuration
RUN mkdir /etc/X11/xorg.conf.d && \
echo -e 'Section "Device"\n\tIdentifier "My GPU"\n\tDriver "nvidia"\nEndSection' > /etc/X11/xorg.conf.d/20-nvidia.conf
USER wineuser
ENV HOME /home/wineuser
ENV LANG ja_JP.UTF-8
ENV LANGUAGE ja_JP.UTF-8
ENV LC_ALL ja_JP.UTF-8
WORKDIR /home/wineuser
RUN wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && \
chmod +x winetricks && \
sudo cp winetricks /usr/local/bin/
# Setting up the wineprefix to force 32 bit architecture.
ENV WINEPREFIX /home/wineuser/.wine
ENV WINEARCH win32
RUN wget http://dl4.roseon.jp/rose/roseon_684.exe
# Adding the link to the pulseaudio server for the client to find it.
ENV PULSE_SERVER unix:/run/user/1000/pulse/native
CMD /bin/bash
" && \"でコマンドをつなげて上げるほうがいいように思いますが、
今回はそこまでやっていません(`・∀・´)エッヘン!!
また、途中でlocale-genを走らせていますが、どうも反映されないようで
最後のほうでENVで設定してます。ですので、locale-genは外してもOKかも
しれません。また、不必要なパッケージのインストールもしているかも
しれません。dockerって必要最低限の容量で動かす事を最良としている
ので、そういった観点だとこのDockerfileはダメダメですねw
で、dockerfileができたら、
Host$ sudo docker run -m 1g -ti \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-v ~/.Xauthority:/home/wineuser/.Xauthority \
-v /dev/snd:/dev/snd --privileged \
-v /run/user/`id -u`/pulse/native:/run/user/`id -u`/pulse/native \
--net=host --name "$CONTAINER_NAME" ohsan/wine
で起動させます。
docker$ sudo dpkg-reconfigure locales
で 生成するロケールの選択:276
システムの環境変数として設定するデフォルトロケール:3
とします。(ja_JP.UTF-8を選んでください)
docker$ winecfg
で、オーディオタブの4つのドロップダウンリストをPulseaudioにして、画面タブ
の「ウィンドウマネージャがウィンドウを装飾するのを許可する」のチェックを
外して適用を押してください。
docker$ winetricks
Select the default wineprefix -> OK
Install a Windows DLL or component -> OK
d3dx9 -> OK
Install a font -> OK
fakejapanese fakejapanese_ipamona ipamona takao -> OK
で、あとはキャンセルを押していってwinetricksを終了させてください。
ここまで終えたら、次はゲームのインストールです。
docker$ wine roseon_684.exe
インストールが終わったら起動させます。
docker$ wine 'c:\Program Files\RoseOnline\TROSE.exe'
いかがでしたか?起動しましたか?起動したら、この状態でコンテナの
保存をしましょう。方法とかは、ググってください。
では、また(^^)/~~
debian 安定版を使っているのですが、最新版 wine をインストールできずに困っていたところ、このページを参考にdockerで任意のバージョンのwineが使えるようになりました。
返信削除ありがとうございました。
こんなページでも参考になってよかったです♪
削除