docker.cr

object oriented docker api interface

docker.cr stability

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

Repository

docker.cr

Owner
Statistic
  • 2
  • 0
  • 0
  • 0
  • 0
  • about 8 years ago
  • April 25, 2017
License

MIT License

Links
Synced at

Tue, 01 Jul 2025 14:42:14 GMT

Languages