Sign inSign up

ozlerhakan/rapid

By ozlerhakan

•Updated almost 9 years ago

🐳 A light-weight Docker Developer Interface for Docker Remote API

Image
2

500K+

ozlerhakan/rapid repository overview

rapid

rapid

Travis devDependency Status License Analytics

Rapid Docker Interface provides a connection between Docker queries and your Docker Host. Rapid changes the way of using Docker Engine API with ease. The Command Editor is your new Docker client communicating with the Engine. You can easily request supported Docker queries of Docker Remote API⁠. Rapid Dashboard was distinguished as a Duke’s Choice Award 2017 Winner⁠ in October at JavaOne. The award is one of nine awards issued for the innovative application of Java in 2017.

⁠Installation

Supported tags:

The command below will pull the latest image of Rapid into your local docker host and start a container as daemon listening internally on port 8080:

$ docker run -d --name rapid  \
 -v /var/run/docker.sock:/var/run/docker.sock \
 -p <PORT>:8080 \
 ozlerhakan/rapid

If your docker host runs via docker machine, go into it using $docker-machine ssh and run the command.

then open your browser to http://localhost:<PORT> or http://<docker-host-vm-ip>:<PORT> , have fun!

In Docker Swarm World, you can run the rapid as a service like below:

$ docker service create --name rapid \
    --mount="type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock" \
    --constraint "node.role == manager" \
    -p 8080:8080 \
    ozlerhakan/rapid

⁠Demo

Try in PWD

⁠Notes

  1. Header Parameters (X-Registry-Auth) are not supported.
  2. Tags ending with arm should work on supported versions of the Raspberry Pi models.

⁠Versions

Docker VersionAPI & Tag VersionChanges
17.06.x1.30, latestAPI changes⁠
17.05.x1.29API changes⁠
17.03.11.27API changes⁠

⁠Editor Shortcuts

Rapid containers the following shortcuts. Any other shortcut suggestions are always welcome.

WindowsMacDetail
Ctrl+D⌘+DDuplicate line
Ctrl+Shift+C⌘+⇧+CCopy the selection as cURL
Ctrl+X⌘+XRemove current line
Shift+Enter⇧+āŽStart new line
Alt+Shift+Up⌄+⇧+UpMove line up
Alt+Shift+Down⌄+⇧+DownMove line down
Ctrl+Mouse_Scroll_Up⌃+Mouse_Scroll_UpZoom in
Ctrl+Mouse_Scroll_Down⌃+Mouse_Scroll_DownZoom out
Ctrl+Alt+H⌘+⌄+HShow shortcuts
Ctrl+Shift+R⌘+⇧+RClear editor
Ctrl+/⌘+/Comment/Uncomment with line comment
⁠cURL Details

The following cURL commands are all valid so as to paste them into the command editor. When you paste a valid command, Rapid converts it to a corresponding valid Docker remote query.

curl --unix-socket /var/run/docker.sock \
 -H "Content-Type: application/json" \
 -X POST http:/v1.26/containers/create \
 -d '
 {"Image": "alpine", "Cmd": ["echo", "hello world"]}
 '

curl --unix-socket /var/run/docker.sock -H "Content-Type: application/json" \
  -X POST http:/v1.26/containers/create \
  -d '{"Image": "alpine", "Cmd": ["echo", "hello world"]}'

curl --unix-socket /var/run/docker.sock \
 -H "Content-Type: application/json" \
 -X POST http:/v1.26/containers/create \
 -d '{"Image": "alpine", "Cmd": ["echo", "hello world"]}'

curl --unix-socket /var/run/docker.sock -X GET http:/v1.26/containers/json

curl --unix-socket /var/run/docker.sock -X GET http:/v1.26/images/json

curl --unix-socket /var/run/docker.sock -XGET http:/v1.26/containers/json

curl --unix-socket /var/run/docker.sock -XGET "http:/v1.26/containers/1c6594faf5/logs?stdout=1"

curl --unix-socket /var/run/docker.sock  -H "Content-Type: application/json"  -X POST http:/v1.26/containers/create -d'
 {"Image": "alpine", "Cmd": ["echo", "hello world"]}
 '

curl --unix-socket /var/run/docker.sock  -H "Content-Type: application/json"  -XPOST http:/v1.26/containers/create -d' {"Image": "alpine", "Cmd": ["echo", "hello world"]}'

curl --unix-socket /var/run/docker.sock\
  -X POST "http:/v1.26/commit?container=0888269a9d&repo=helloworld"

The ⌘+⇧+C shortcut enables you to convert the selection to the equivalent cURL command and copy it to clipboard.

A selected query from the command editor

POST containers/create?name=mycontainer
{
    "Image": "alpine",
    "Cmd": [
        "echo",
        "hello world"
    ]
}

The equivalent cURL command of the query above

curl --unix-socket /var/run/docker.sock -XPOST "http:/v1.26/containers/create?name=mycontainer" -H "Content-Type: application/json" -d'
{
    "Image": "alpine",
    "Cmd": [
        "echo",
        "hello world"
    ]
}'

⁠Contributing

Any comments/issues/PRs are always welcome!

⁠License

Rapid is released under MIT.

Tag summary

Content type

Image

Digest

Size

72.4 MB

Last updated

almost 9 years ago

docker pull ozlerhakan/rapid