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

  1. Download the Kong Gateway entry-point script:
     curl -O https://raw.githubusercontent.com/Kong/docker-kong/master/docker-entrypoint.sh
    
    Copied to clipboard!
  2. Make the script executable:
     chmod +x docker-entrypoint.sh
    
    Copied to clipboard!

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 to clipboard!

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 to clipboard!

If the image was built correctly, a Docker container will start and output the Kong Gateway Enterprise version to the console.

FAQs

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!