A more dynamic container builder

Buildahscript is a new container definition language built to be imperative and flexible.

It allows you to do more with buildargs, create actually re-usable modules, and in general create more flexible containers.

Why Buildahscript?

Traditional Dockerfiles have limitations that can make it hard to express some things succintly, especially around buildargs. If you would like to do these things, you should look at using buildahscript instead:

What does it look like?

Here’s a port of the xonsh Dockerfile

#| arg: variant
#| arg: version

dashvariant = f"-{variant}" if variant else ""
specifier = f"=={version}" if version else ""

with container(f"python:3{dashvariant}") as cnt:[
        'pip', 'install', '--no-cache-dir',
    with cnt.mount() as root:
        (root / "usr" / "bin" / "xonsh").symlink_to('/usr/local/bin/xonsh')

    cnt.command = ['/usr/bin/xonsh']
        "repository": "",
        "homepage": "",
        "maintainer": "Jamie Bliss <>",

    return cnt.commit()


  1. Install Buildah
  2. Install buildahscript with Pip ($ pip3 install --user buildahscript)


Buildahscript is made available publically under the Prosperity License. Commercial Licenses are available via licensezero