docker.cr ![stability]0

This shard provides an object oriented interface to the Docker Remote API.

Installation

Add this to your application's shard.yml:

dependencies:
  docker:
    github: f-mer/docker.cr

Usage

require "docker"

Docker.configure do |config|
  #config.address = "tcp://localhost:2376"
  config.address = "unix:///var/run/docker.sock"
end

puts Docker::Container.all.inspect

# swarm mode has to be enabled
puts Docker::Service.all.inspect

API

`Docker.configure(&blk : Proc(config : Docker::Configuration))

Configures the default connection object.

Docker::Container.all(all : Bool, limit : Int32?, since : String?, before : String?, size : Bool, filters : String => Array(String))

/containers/json

Queries containers

Docker::Service.all(id : Int32?, label : String?, name : String?)

/services

Queries swarm services

License

MIT