Skip to content

f-mer/docker.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

object oriented docker api interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published