Public Repository

Last pushed: a year ago
Short Description
Unofficial image for INJECTION, a programming puzzle game
Full Description

INJECTION

https://schilcote.itch.io/injection

Usage

Since the game needs to draw on a display, usage is a bit more complicated than usual:

On Ubuntu

docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY underyx/injection

On macOS

Make sure that socat is available. You can install it with Homebrew with brew install socat.

socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
docker run -e DISPLAY=192.168.99.1:0 underyx/injection

You might need to replace the 192.168.99.1 IP address here — you can check your virtual machine's network address with ifconfig to find the correct one.

Building this image

  1. Download and extract the game's source code from https://schilcote.itch.io/injection
  2. Add two packages to the requirements.txt file: cython and hg+https://bitbucket.org/pygame/pygame@9886cf7
  3. Use the Dockerfile from below

Dockerfile

FROM python:3.5

MAINTAINER Bence Nagy <bence@underyx.me>

RUN apt-get clean && \
  apt-get update && \
  apt-get install -y python3-tk mercurial python3-dev python3-numpy \
  python3-opengl libav-tools libsdl-image1.2-dev libsdl-mixer1.2-dev \
  libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev \
  libavformat-dev libavcodec-dev libtiff5-dev libx11-6 libx11-dev \
  fluid-soundfont-gm musescore-soundfont-gm xfonts-base xfonts-100dpi \
  xfonts-75dpi xfonts-cyrillic fontconfig fonts-freefont-ttf

RUN mkdir /app
WORKDIR /app

COPY requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt

COPY . /app
RUN pip install .

CMD [ "python", "main.py" ]

Note that this Dockerfile is quite wasteful with space; some of those apt packages might not be necessary, and most should be possible to remove after pygame has been built.

Docker Pull Command
Owner
underyx

Comments (0)