I'm working on a brand new volume plugin and I'm required all of vol-test tests to be passed. And I have all tests successfully passed (on an environment with installed plugin) except the first one, which is docker plugin install. The thing is that there are three possible ways one can install a custom plugin:
.sock files are UNIX domain sockets.
.spec files are text files containing a URL, such as unix:///other.sock or tcp://localhost:8080.
.json files are text files containing a full json specification for the plugin.
and we use json, which is simply a REST server implementing docker API (written in java, spring). The installation process for it straight forward: just copy the json file in /etc/docker/plugins and dockerd automatically discovers it.
The problem comes when I try to integrate the plugin into docker plugin install command. As it stated here:
Docker looks first for the plugin on your Docker host. If the plugin does not exist locally, then the plugin is pulled from the registry.
Our installation process doesn't assume a connection to a private or public registry, so we need first docker plugin create command in order to create the plugin locally. And this is where I'm having hard time to wrap my head around how to do that with json-based plugin. As per this doc, I need to specify a path to the plugin. If I use a directory name it expects config.json and rootfs to be present in the directory.
BUT
1. config.json - this is a config, that describes .sock format configs, and not the .json format (please correct me if I'm wrong)
2. how do I create the rootfs and why do I need it if my plugin is just a standalone REST service and it is not even in the container?
Appreciate any help.