DrolleryMedieval drollery of a knight on a horse
flowery border with man falling
flowery border with man falling

Running docker-compose in org-mode

First, you need to provide some yaml support for Babel:

(defun org-babel-execute:yaml (body params) body)

Then it’s just a matter of defining a docker-compose.yml file:

version: '3'
services:
  mineswept:
    image: pard68/mineswept
    ports: ["80:80"]

And then run it!

docker-compose up -d

Notes

Defining the docker-compose.yml file does take a little work. You’ll need to specify the :results output to a file and then name that :file as docker-compose.yml. We also direct the :dir to our $TMPDIR, this way we don’t pollute our directorites with yaml files. I attempted to set :dir globally with a #+PROPERTY: header-args :dir (getenv "TMPDIR") but it didn’t work. Might be worth investigating down the road.