For those who need to run a Windows-only game server on a linux server with docker.
Build with sudo docker build --rm -t ubuntu_wine:latest .
. Run it with sudo docker run -ti ubuntu_wine
.
Util scripts are in the root's home folder.
setvnc.sh
is for setting up a VNC server (runs forever) and XVFB environment, this works on servers without a graphic card.
explorer_wine.sh
launches a file explorer on that deskop.
This Dockerfile installs nano wget xfce4-terminal
by default,
if you don't need the graphical terminal emulator or the utilities, you can remove them.
FROM ubuntu:16.04
MAINTAINER Rikka0w0
# Inspired by monokrome/wine
USER root
# Install some tools required for creating the image
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
fluxbox xvfb x11vnc \
ca-certificates
# Install wine and related packages
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y --no-install-recommends wine
# Install utils (Remove the following if you don't need then)
RUN apt-get update && \
apt-get install -y --no-install-recommends nano wget xfce4-terminal
# Clean up
RUN rm -rf /var/lib/apt/lists/*
# Generate ShortCuts
RUN echo "export DISPLAY=:1\nXvfb :1 -screen 0 1024x768x16 &\nfluxbox &\nx11vnc -forever -display :1 -bg -nopw -xkb" > /root/setvnc.sh \
&& chmod +x /root/setvnc.sh \
&& echo "export DISPLAY=:1\nwine explorer &" > /root/explorer_wine.sh \
&& chmod +x /root/explorer_wine.sh