Build a custom Docker image
Uses:
Kong Gateway
Incompatible with
konnect
Related Documentation
Tags
Related Resources
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.shCopied! - Make the script executable:
chmod +x docker-entrypoint.shCopied!
Download the Kong Gateway base image
- Download the image for your operating system.
- Rename the file to either
kong.deborkong.rpmdepending 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 .
Copied!
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
Copied!
If the image was built correctly, a Docker container will start and output the Kong Gateway Enterprise version to the console.