Giter Site home page Giter Site logo

dockersql's Introduction

dockersql

Query your docker with SQL. Why? Why not.

Connect to your docker

dockersql --docker http://docker:2375

Get the count of all images

dockersql
> select count(*) from images;
count(*)
25
>

Select all images larger than 1G

dockersql
> select * from images where virtual_size > 1024*1024*1024
id                                                                 parent_id                                                          size       virtual_size   tag
8803adbf8f9c90dd66c146651401aab40a1c12cdbb6fb5bd3934c4ad6f05389d   e16a6ea01ac787c7bebdd73c92037a4fa9ca2bd61979ba00d1831d535aefdaf2   55810869   1196777592     docker:latest
f2505178b040558983f5a54ec32119d1407b68aa936be4942d5a41a199befaf2   e16a6ea01ac787c7bebdd73c92037a4fa9ca2bd61979ba00d1831d535aefdaf2   59775724   1200742447     release:latest
>

Join containers and images

dockersql
> SELECT c.id, c.name, c.image FROM containers AS c JOIN images AS i ON c.image=i.tag
id                                                                 name              image
3481862d9bb6e0fd9ad4d951faa7ebf9a477a0194975fb1698a1d3e9691c7935   /redis            crosbymichael/redis:latest
f733305c31fd3e7ea7269a96ff1747f977ee5a19decf8b4778a481a010434a0c   /local-registry   registry:latest
>

License - MIT

dockersql's People

Contributors

crosbymichael avatar

Watchers

James Cloos 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.