Skip to content

Instantly share code, notes, and snippets.

@rikka0w0
Created February 9, 2019 12:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rikka0w0/f1d5cd7d35eb4590941c11e4b05c752c to your computer and use it in GitHub Desktop.
Save rikka0w0/f1d5cd7d35eb4590941c11e4b05c752c to your computer and use it in GitHub Desktop.
Dockerfile-Ubuntu+Wine

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment