Run Inso CLI on Docker

Uses: Insomnia
TL;DR

Pull the latest kong/inso Docker image, then run Inso CLI commands by mounting your specs folder to the /var/temp folder in the container.

Prerequisites

Download and install Insomnia.

For this task, you need a design document in Insomnia. We’ll use the KongAir Flights Service specification.

  1. Click the button below to import the specification as a design document in Insomnia.

    Run in Insomnia}

  2. Click RUN FLIGHTS SERVICE, then Open Insomnia.
  3. Click Scan, then click Import.

A new Flights Service 0.1.0 document is created.

Pull kong/inso

Pull the latest kong/inso Docker image:

docker pull kong/inso:latest

All available tags can be found on Inso CLI’s Docker Hub page.

Run Inso CLI commands

To run Inso CLI commands in the kong/inso container, mount the specs folder on your host machine to a /var/temp folder in the container. In this example, we’ll use the lint spec command. Run the command based on the location of your Insomnia data. In this example, we’re using the default application data folder:

For more location options, see the FAQs.

FAQs

Use the following command from your Insomnia Git repository folder to mount it to the /var/temp folder in the container:

docker run -it --rm -v $(pwd):/var/temp kong/inso:latest lint spec -w /var/temp

Use the following command to mount the folder where you keep an Insomnia v4 export:

docker run -it --rm -v $(pwd):/var/temp kong/inso:latest lint spec -w /var/temp/Insomnia_YYYY-MM-DD.json
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!