shithub: purgatorio

Download patch

ref: 53aac62a54ebbcc1781c0000d3e2384ed038c7bb
parent: b7af62b250e5dff30320a181ca9d53ab5a7c276d
author: mehlon <>
date: Sat Sep 21 14:05:45 EDT 2019

add Dockerfile, Docker instructions

--- /dev/null	Mon Oct 18 12:05:45 2021
+++ b/.dockerignore	Sat Sep 21 14:05:45 2019
@@ -0,0 +1,71 @@
+# the following are copied from .hgignore
+# Only Linux 386 files are needed for Docker
--- /dev/null	Mon Oct 18 12:05:45 2021
+++ b/Dockerfile	Sat Sep 21 14:05:45 2019
@@ -0,0 +1,39 @@
+FROM i386/ubuntu:devel
+RUN apt-get -y update
+RUN apt-get install -y libx11-dev \
+	libxext-dev \
+	libc6-dev \
+	gcc
+# if on i386 there's no need for multilib
+#RUN apt-get install -y libc6-dev-i386
+#RUN apt-get install -y libx11-6:i386, libxext-dev:i386
+#RUN apt-get install -y gcc-multilib
+ENV INFERNO=/usr/inferno
+# setup a custom mkconfig
+RUN echo > mkconfig ROOT=$INFERNO
+RUN echo >>mkconfig TKSTYLE=std
+RUN echo >>mkconfig CONF=emu
+RUN echo >>mkconfig SYSHOST=Linux
+RUN echo >>mkconfig SYSTARG=Linux
+RUN echo >>mkconfig OBJTYPE=386
+RUN echo >>mkconfig 'OBJDIR=$SYSTARG/$OBJTYPE'
+RUN echo >>mkconfig '<$ROOT/mkfiles/mkhost-$SYSHOST'
+RUN echo >>mkconfig '<$ROOT/mkfiles/mkfile-$SYSTARG-$OBJTYPE'
+# build code
+RUN ./
+ENV PATH="$INFERNO/Linux/386/bin:${PATH}"
+RUN mk nuke
+RUN mk mkdirs
+RUN mk install
+# docker run -it mehlon/purgatorio
+CMD ["emu", "-c1",  "echo", "Hello from Purgatory!" ]
--- a/INSTALL	Fri Aug  2 21:59:56 2019
+++ b/INSTALL	Sat Sep 21 14:05:45 2019
@@ -91,9 +91,19 @@
 1    Edit mkconfig
-2    Add $INFERNO/Nt/386/bin to Path 
+2    Add $INFERNO/Nt/386/bin to Path
 3    Start Developer Command Prompt
 4    `mk install`
+Inferno can also be built with the provided Dockerfile:
+1    `docker build -t purgatorio .`
+2    `docker run -it purgatorio emu`
+This will build Inferno on a small Ubuntu base. Note that Docker sandboxes network connections by default. If you want to forward ports from the Inferno container to your host machine, you can use `docker run -p 8080:80` to forward the port 8080 (host) to the port 80 (Inferno). If you want to run graphical programs and have an Xorg server running, you have to disable network sandboxing and pass the $DISPLAY variable to Docker like this:
+`docker run --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" purgatorio emu wm/wm`
+This works on Linux. On Windows and macOS you would need some kind of custom Xserver setup to make this work.