This shard provides an object oriented interface to the Docker Remote API.
Add this to your application's shard.yml
:
dependencies:
docker:
github: f-mer/docker.cr
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
Configures the default connection object.
Docker::Container.all(all : Bool, limit : Int32?, since : String?, before : String?, size : Bool, filters : String => Array(String))
Queries containers
Queries swarm services