docker.cr

Version, currently master branch1 version
  • master branchlatestApr 25, 2017

github.com/f-mer/docker.cr

object oriented docker api interface

2 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  docker.cr:
    github: f-mer/docker.cr
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.22.0
License
MIT
Author
Fabian Mersch

Dependencies

This version declares no dependencies.

README

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