Skip to content

Get host port for a docker container in Insomnia REST Client

License

Notifications You must be signed in to change notification settings

ttrig/insomnia-plugin-dockerport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Insomnia Docker Port Template Tag

Travis (.org)

This is a plugin for Insomnia that provides a host port number for a docker container.

Usage

Add tag

Use tag as variable

You can get container name and port with docker ps.

$ docker ps --format "table {{.Names}}\t{{.Ports}}"
NAMES               PORTS
foo                 0.0.0.0:32768->80/tcp
bar                 0.0.0.0:32770->80/tcp

Container foo will return 32768.

Installation

Place the plugin in a directory that Insomnia knows about.

  • Linux: $XDG_CONFIG_HOME/Insomnia/plugins/ or ~/.config/Insomnia/plugins/
  • MacOS: ~/Library/Application\ Support/Insomnia/plugins/
  • Windows: %APPDATA%\Insomnia\plugins\
$ git clone https://github.com/ttrig/insomnia-plugin-dockerport.git
$ cd insomnia-plugin-dockerport
$ npm install

Install the plugin from Preferences > Plugins.

Docker

Run dockerd with -H tcp://0.0.0.0:2376 to make the Docker daemon listen for Docker Engine API requests via tcp.

About

Get host port for a docker container in Insomnia REST Client

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published