Hello everyone, I’m a student in IT and I am starting with KONG and Docker. That’s why I have some little issues. Is someone would like to answer them ?
I tried to create a custom plugin for Kong. I am not sure about how I did it, but it is working (thanks to hello world plugin example). I did everything on Linux Ubuntu. But now I would like to export this plugin for a Kong contained in a Docker. I followed the instructions for installing the plugin with luarocks but for the last step, I need to add my custom plugin the Kong’s configuration. I don’t know where I can add it and how I can restart Kong to use theses changes.
Your question is more related with Docker than with Kong.
The best way to do what you are suggesting is creating your own Dockerfile.
Kong’s Dockerfile for alpine executes some commands. You need your version of kong to execute one additional command (installing your plugin via luarocks).
You could just copy the file I linked above and just add the missing command, and that would probably work, but a more “dockerish” way to do it would be declaring that your dockerfile uses the kong image as a parent image (you do this by using the FROM directive in your Dockerfile) . Then you could add the luarocks command to install your plugin. You would then have to use that Dockerfile to run kong instead of the default one.