docker-run-export can be invoked as a Docker CLI plugin, which means you can use docker dre instead of typing the full binary name. Every subcommand works the same way:
docker dre run --dre-format compose alpine:latest
# equivalent to
docker-run-export run --dre-format compose alpine:latestDocker discovers plugins by scanning specific directories for executables named docker-<name>. The docker-run-export plugin binary is named docker-dre (Docker CLI plugin names must be lowercase alphanumeric with no hyphens). When Docker finds this binary, running docker dre <subcommand> invokes it automatically.
Docker searches these directories for plugins:
- Per-user:
~/.docker/cli-plugins/docker-dre - System-wide (Linux):
/usr/libexec/docker/cli-plugins/docker-dreor/usr/local/lib/docker/cli-plugins/docker-dre - System-wide (Homebrew):
$(brew --prefix)/lib/docker/cli-plugins/docker-dre
The supported distribution channels install the plugin automatically:
- Debian/Ubuntu: the
.debpackage installs both/usr/bin/docker-run-export(for direct invocation) and/usr/libexec/docker/cli-plugins/docker-dre(for Docker CLI plugin lookup). - Homebrew:
brew install dokku/repo/docker-run-exportplaces the binary underbin/and symlinks it into Homebrew'slib/docker/cli-plugins/. - Install script: downloads the appropriate release tarball for your OS/architecture and installs the binary at
~/.docker/cli-plugins/docker-dre. - From source:
make installbuilds for your current OS/architecture and copies the binary into~/.docker/cli-plugins/.
After installation, confirm that Docker sees the plugin:
docker dre versionYou can also check that docker --help lists dre under the "Plugin commands" section.
You can always run the binary directly without the Docker CLI plugin mechanism. This is useful if Docker is not installed on the machine where you are generating configuration:
docker-run-export run --dre-format compose alpine:latest