GithubHelp home page GithubHelp logo

ozlerhakan / rapid Goto Github PK

View Code? Open in Web Editor NEW
139.0 14.0 23.0 8.08 MB

:whale: A lightweight Docker Developer Interface for Docker Remote API

License: MIT License

Java 61.77% HTML 2.13% CSS 1.71% JavaScript 34.39%
docker dashboard java-8 java react docker-remote-api docker-ui ui rapid rapid-dashboard

rapid's Introduction

duke rapid logo

Travis devDependency Status License Analytics

screen

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 and we need to give access to the host’s Docker daemon by mapping to the Docker socket:

$ docker run -d --name rapid  \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -p 8080: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:8080 or http://<docker-host-vm-ip>:8080, 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 Version API & Tag Version Changes

17.07.x

1.31, latest

API changes

17.06.x

1.30, latest

API changes

17.05.x

1.29

API changes

17.03.1

1.27

API changes

Editor Shortcuts

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

Windows Mac Detail

Ctrl+D

+D

Duplicate line

Ctrl+Shift+C

++C

Copy the selection as cURL

Ctrl+X

+X

Remove current line

Shift+Enter

+

Start new line

Alt+Shift+Up

++Up

Move line up

Alt+Shift+Down

++Down

Move line down

Ctrl+Mouse_Scroll_Up

+Mouse_Scroll_Up

Zoom in

Ctrl+Mouse_Scroll_Down

+Mouse_Scroll_Down

Zoom out

Ctrl+Alt+H

++H

Show shortcuts

Ctrl+Shift+R

++R

Clear 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.32/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.32/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.32/containers/create \
 -d '{"Image": "alpine", "Cmd": ["echo", "hello world"]}'

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

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

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

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

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

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

curl --unix-socket /var/run/docker.sock\
  -X POST "http:/v1.32/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.32/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.

rapid's People

Contributors

gokselpirnal avatar ozlerhakan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.