How build Plugins using Docker

From MOD Wiki
Jump to navigation Jump to search

Last update: 11 February 2026

This document contains information on how to build your audio plugins for the MOD devices, specifically for non-Linux hosts such as macOS or Windows, using Docker.

To build a plugin using Docker, you will need to follow these steps:

Step 0: Install Docker

Before we start building, we need to install Docker, as the cross-compilation steps are meant to be used under a Linux host, and Docker is a nice and common way to achieve that. You can either install Docker Desktop or any alternative of your choice; the only requirement is to be compatible with the Docker buildx command.

How you install Docker is outside the scope of this document; the next step assumes you have it installed and working already.

Step 1: Build the Docker image

To start, we build the Docker image that contains the toolchain, host tools and extra libraries. The Dockerfile can be found here.

Note: please follow the steps according to the MOD device that you want to build for.

Assuming you have Docker installed, you can build it like this:

MOD Duo

docker buildx build \
    --build-arg debug=false \
    --build-arg target=full \
    --tag "modduo-new" \
    /path/to/Plugin-Dev-Setup/docker

MOD Duo X

docker buildx build \
    --build-arg debug=false \
    --build-arg target=full \
    --tag "modduox-new" \
    /path/to/Plugin-Dev-Setup/docker

MOD Dwarf

docker buildx build \
    --build-arg debug=false \
    --build-arg target=full \
    --tag "moddwarf-new" \
    /path/to/Plugin-Dev-Setup/docker


The debug argument is optional; the default is false, but it can be set to true if needed. We recommend naming the image with a debug suffix (e.g. --tag "modduo-new", "modduox-new", or "moddwarf-new-debug") to easily differentiate between release and debug builds.

The target argument is also optional, with these possible choices:

full (builds everything: toolchain and all libs) minimal (builds minimal libs only, includes host-cmake, fftw and liblo) kernel (builds libs needed for the Linux kernel) toolchain (builds toolchain only, no extra libs or host tools) The full build will take approximately 1 hour in total, and require around 15Gb of disk space.

You can verify that you have a valid Docker image by running docker images. Your output should contain "modduo-new", "modduox-new", or "moddwarf-new" (according to your device), for example:

MOD Duo

% docker images
REPOSITORY          TAG       IMAGE ID       CREATED          SIZE
modduo-new          latest    782ca98b7eff   41 minutes ago   14.6GB

MOD Duo X

% docker images
REPOSITORY          TAG       IMAGE ID       CREATED          SIZE
modduox-new         latest    782ca98b7eff   41 minutes ago   14.6GB

MOD Dwarf

% docker images
REPOSITORY          TAG       IMAGE ID       CREATED          SIZE
moddwarf-new        latest    782ca98b7eff   41 minutes ago   14.6GB

Step 2: Run the Docker image mounted with your local files

After creating a Docker image, we need to create a container based on that image, so we can dynamically run things from it. Because it is a container, it has no direct access to the host filesystem, so we need to map between a folder on the host and the container.

To create a container, run the Docker command like this:

MOD Duo

docker run \
    --name "mod-container-name" \
    -ti \
    -v /path/to/your/project:/root/source \
    "modduo-new:latest"

MOD Duo X

docker run \
    --name "mod-container-name" \
    -ti \
    -v /path/to/your/project:/root/source \
    "modduox-new:latest"

MOD Dwarf

docker run \
    --name "mod-container-name" \
    -ti \
    -v /path/to/your/project:/root/source \
    "moddwarf-new:latest"

The --name argument specifies a container name to use; change it to whatever makes more sense for you.

The -ti argument combines t for enabling a "TTY" and i for making it interactive. These 2 arguments together are what allow us to run commands inside the container.

The -v argument specifies a host folder to mount inside the container folder, using ":" as a separator between host and container paths. This argument can be used multiple times to mount multiple folders. The container folder does not need to exist beforehand; Docker creates it as needed.

Finally, the "modduo-new:latest", "modduox:latest", or "moddwarf-new:latest" specifies the image name from which to create the container.

The first time you run this command, you will be dropped into a bash shell inside the container. You can close it at anytime with Ctrl+D. Running it again is possible with docker start -i "mod-container-name" (adjusting name as needed).

Step 3: Build your own project with the custom toolchain

Example using cmake

# setup your project for building (-S specifies cmake project folder, -B specifies build output folder)
cmake -S /path/to/your/project -B build-mod

# build your project
$(which cmake) --build build-mod
NOTE: The odd $(which cmake) above is required; the build environment uses cmake as an alias with a few extra args, which would override --build.

Example using raw makefiles

Simply do:

# build your project (-C specifies the project build folder)
make -C /path/to/your/project

Step 4: Deploy Plugin

We can deploy the compiled plugin to the MOD using MOD-SDK or manually using curl (advanced).

If you have mod-sdk installed, start it up using the target plugin dir as LV2_PATH, like so:

$ export LV2_PATH=~/mod-workdir/plugins/
$ modsdk

Then open a browser at localhost:9000, select a plugin from the list and use the "deploy" tab to push the selected plugin's bundle to the Duo.


For advanced users, you can push a bundle to the mod by running this: (adjust as needed)

$ cd ~/mod-workdir/plugins/
$ tar cz eg-amp.lv2 | base64 | curl -F 'package=@-' http://192.168.51.1/sdk/install


That's it! Your plugin is now inside the MOD!