Build a custom Docker image
Uses:
Kong Gateway
Related Documentation
Incompatible with
konnect
Tags
Minimum Version
Kong Gateway - 3.4
TL;DR
Create a Docker file and use docker build
to build the image.
Prerequisites
Download the Kong Gateway entry-point script.
- Download the Kong Gateway entry-point script:
curl -O https://raw.githubusercontent.com/Kong/docker-kong/master/docker-entrypoint.sh
- Make the script executable:
chmod +x docker-entrypoint.sh
Download the Kong Gateway base image
- Download the image for your operating system.
- Rename the file to either
kong.deb
orkong.rpm
depending on the package.
Create a Dockerfile
Create a Dockerfile using any of the following templates:
Build the image
Using the docker build
command, you can build the image:
docker build --platform linux/amd64 --no-cache -t kong-image .
Docker will build the image according to the parameters set in the Dockerfile.
Validate the image
Validate that the image was built correctly using docker run
:
docker run -it --rm kong-image kong version
If the image was built correctly, a Docker container will start and output the Kong Gateway Enterprise version to the console.