Can a docker network plugin run as a container?

I have seen several examples of docker network plugins running within a docker container. For example:

https://github.com/gopher-net/docker-ovs-plugin

This to me seems problematic. It clearly says in the docker documentation "Plugins should be started before Docker, and stopped after Docker".

https://docs.docker.com/engine/extend/plugin_api/#plugin-lifecycle

Am I missing something? I would much rather run my network plugin as a container as opposed to a systemd service, but I don’t see how I would not get into issues on docker daemon reload.

As far as I know docker would not know to start your network container plugin before other containers/networks, and this would potentially lead to failed RPCs if the network is created before the plugin container is restarted.

Source: Docker Questions

LEAVE A COMMENT