So Docker plugins rely on Docker running locally. When we run cloudquery plugin install, it is actually a wrapper around docker pull, so the images do not end up in .cq/plugins/source. The easiest way to deploy a Docker plugin in a containerized environment is to run the plugin as a sidecar and communicate via gRPC. We have an example of how to do this in our docs: Using CloudQuery Docker Registry Plugins Inside a Containerized Environment.
Maybe also worth mentioning that most official plugins are not Docker plugins. But if you write a custom plugin in Python, Java, or JavaScript, or use one of the few official ones that are written in one of those languages, this advice would apply.
All plugins run as a gRPC server. Go plugins are built as a binary which is downloaded based on the local OS/Arch. Python, Java, and JavaScript plugins use Docker to support multiple OS/Archs.
It’s harder to build Python/JavaScript plugins to multiple OS/Archs, especially if you have native bindings. So, it’s harder to publish Python/JavaScript packages as a single binary (e.g., you’d have to package Python/Node.js with it too probably to ensure compatibility). Docker solves that.
You don’t have to publish to the Hub; you can configure
registry: local
path: <local-path-to-binary>
Then, if you download the binary manually before running the sync, it should work (e.g., via curl). You could even run the Python plugin directly via
registry: grpc
path: localhost:7777
assuming you have the plugin running via python main.py serve or something similar. Not sure what would work best for you.
You can also publish to the Hub as a private plugin; then it will be accessible only to your team.
So just spitballing here, not trying to reinvent what you have, but if I were to compile the Python code using something like Nuitka, then I can have it running locally and use the registry: local designation potentially.
Yes, that would be possible. If you would like to set up a call to talk through the ways to deploy a custom plugin in your organization, we would be happy to chat!