Sign inSign up

krakend/builder

By krakend

•Updated 21 days ago

Official Docker image to build and compile custom plugins.

Image
0

100K+

krakend/builder repository overview

⁠Plugin Builder

When using Docker to deploy your gateway, the official KrakenD container uses Alpine⁠ as the base image. Therefore, to use your custom plugins, they must compile within an Alpine container and use the same Go and Glibc versions as KrakenD. The Plugin Builder docker image spares you from this job.

You can get the plugin builder with the following:

docker pull krakend/builder:YOUR-KRAKEND-VERSION

Make sure the tag matches exactly the version you are going to deploy.

Then to build your plugin, you only need to execute the following command inside the folder where your plugin is:

docker run -it -v "$PWD:/app" -w /app krakend/builder:YOUR-KRAKEND-VERSION go build -buildmode=plugin -o yourplugin.so .

The command will generate a yourplugin.so file (name it as you please) that you can now copy into a {{< product image >}}:{{< product latest_version >}} Docker image (but not to tag mismatching the builder), and load it as described in injecting plugins⁠.

The builder will compile the plugin for AMD64 by default. If you'd like to load the plugin on ARM64 (e.g., Docker on Mac) see cross-compiling in the documentation.

For further instructions, see the documentation to build plugins⁠

Tag summary

Content type

Image

Digest

sha256:8570c175e…

Size

348.7 MB

Last updated

21 days ago

docker pull krakend/builder