Skip to content

SkiFree in Docker, running via WINE.

Notifications You must be signed in to change notification settings

darkvertex/docker-skifree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SkiFree in Docker

What is it?

The classic 90s game SkiFree running in WINE via X from your host Linux system.

The Yeti that eats you.

How to Run

To run the Dockerhub image, you will need to pass your $DISPLAY env var, match your user ID and mount your X socket, like so:

docker run -it --rm -e DISPLAY=$DISPLAY --user `id -u` -v="/tmp/.X11-unix:/tmp/.X11-unix" alanf/skifree-wine

Which version of the game is this?

It runs the most officialest 32bit build from the original website.

But... why?!

I was so preoccupied with whether I could, that I didn't stop to think if I should...

Kidding aside, unlike the original from Windows 3.1 (that you can still run in DOSBOX online), this one scales to the biggest your screen can fit.

Here it is running in my laptop's high-DPI display at glorious 1792x1696 resolution:

start screen

and in action:

skiing

Can I escape the Yeti?!

Yes, it's possible.

xkcd

Escape the Yeti by traveling another 2000 m from the point at which the monster gives chase, creating a loop and starting over from the beginning.

One way to evade it is to go directly left or right in fast mode with the "F" key. He is right behind you, but cannot catch you unless you hit an obstacle.

I'm on Windows, how do I run this?

You're on Windows?? Dude, you don't need WINE.. You don't even need Docker!

Just run the actual executable.

But I love WSL (Windows Subsystem for Linux), can I run this there anyway? You know, for science!

Okay, sure. Just remember WSL1 and WSL2 don't have GPU acceleration so don't expect great framerates.

  1. You can install an X server, such as "GWSL" (free from the Windows Store.)

  2. Once it's running, add this to your ~/.bashrc to expose your DISPLAY:

# WSL [Windows Subsystem for Linux] customizations:
if [[ $(grep microsoft /proc/version) ]]; then
    # If we are here, we are under WSL:
    if [ $(grep -oE 'gcc version ([0-9]+)' /proc/version | awk '{print $3}') -gt 5 ]; then
        # WSL2
        [ -z $DISPLAY ] && export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0
    else
        # WSL1
        [ -z $DISPLAY ] && export DISPLAY=127.0.0.1:0.0
    fi
fi
  1. Log out and back in from a fresh terminal.
  2. X forwarding should work now. Go on and try xeyes or the full skifree command from the top of this README.

If you succeeded, good job! You now made a 32bit Windows exe run in a Linux container from inside a Linux Windows subsystem. (You crazy maniac, you!)

But really, why did you make this?

I was reading about X forwarding in Docker containers and wanted to put it to practice.

This exercise taught me that --user in docker run with your own user ID lets you tap into your active X session easily without file ownership issues or X security errors.


Enjoy! (and don't let the Yeti get ya!!)

About

SkiFree in Docker, running via WINE.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages