I wanted to use a base image and install my custom plugin with dependencies and create a custom image for my use - I am unclear on the steps to do this.
I was able to test the plugin in pongo environment but I am unclear of the installation step where the plugin has some dependency. All the resources I saw online was plugins without dependency.
Hi @JohnWilliams - You have not mentioned Kong version and exact error message you received. However, if it is asking for xml2lua dependencies, use this “luarocks install xml2lua” command while deploying the kong.
you can also use another environment variable "KONG_LOG_LEVEL: “debug” to see the debug logs in the container.
Apart from this, I can see that the environment variable you mentioned above has relative path, not sure this is the cause but still better try to put absolute path like below:
Thanks @Sachin_Ghumbre . I was able to finally create a custom image using the below dockerfile. Thing I missed was the source image should have an environment to install and run commands.
FROM kong/kong-gateway:3.1.1.2-alpine
USER root
RUN apk update
RUN apk add lua5.1 lua5.1-dev luarocks5.1
RUN apk add gcc expat expat-dev expat-static musl-dev
RUN luarocks install xml2lua 1.5-2
USER kong
WORKDIR /usr/local/share/lua/5.1/kong/plugins
COPY kong/plugins/ ./ #Copy the plugin code from local to docker path
After building this custom image, I was able to start the container by passing this param,