They created a neat way of creating a docker base image from scratch using mock.

In order to do this, you should follow the instructions from
README
of the repo. Before running avocado run setup.py, we need to change configuration
of mock because by default it uses Boltron (F26) repos and targets x86_64.

Modular dnf is still not available in mainline. Martin is providing the RPM via
his COPR repo
mhatina/DNF-Modules.
The important note is that the modular DNF is only available for architectures
x86_64, i386 and ppc64le.