项目作者: pivstone

项目描述 :
Docker Client via Unix Socket
高级语言: Elixir
项目地址: git://github.com/pivstone/docker_client.git
创建时间: 2016-09-27T03:05:54Z
项目社区:https://github.com/pivstone/docker_client

开源协议:MIT License

下载


Docker Client

Support:

HTTP / Unix Socket

NOTE

HTTPS(TLS) not Supported!

Only Erlang 19 Support(Experimental)unix sockets

Status

DON’T USE IN PRODUCTION NOW

Installation

If available in Hex, the package can be installed as:

  1. Add docker_client to your list of dependencies in mix.exs:

    1. def deps do
    2. [{:docker_client,git: "https://pivstone.github.io/docker_client.git"}]
    3. end
  2. Ensure docker_client is started before your application:

    1. def application do
    2. [applications: [:docker_client]]
    3. end

Usage

  1. iex> config = Docker.config()
  2. iex> Docker.containers(config)
  3. [%{"Command" => "nginx -g 'daemon off;'", "Created" => 1476779504,
  4. "HostConfig" => %{"NetworkMode" => "default"},
  5. "Id" => "ccb46930869ea70f55fae0f29904a96651c59635e5bb905bfe9c5da9ed2a7021",
  6. "Image" => "nginx",
  7. "ImageID" => "sha256:ba6bed934df2e644fdd34e9d324c80f3c615544ee9a93e4ce3cfddfcf84bdbc2",
  8. "Labels" => %{}, "Mounts" => [], "Names" => ["/hungry_fermat"],
  9. "NetworkSettings" => %{"Networks" => %{"bridge" => %{"Aliases" => nil,
  10. "EndpointID" => "41abb0b3e7ac420ce7c2b27fd7f45361402f223d8e7f9194219409498ec6e68c",
  11. "Gateway" => "172.17.0.1", "GlobalIPv6Address" => "",
  12. "GlobalIPv6PrefixLen" => 0, "IPAMConfig" => nil,
  13. "IPAddress" => "172.17.0.2", "IPPrefixLen" => 16, "IPv6Gateway" => "",
  14. "Links" => nil, "MacAddress" => "02:42:ac:11:00:02",
  15. "NetworkID" => "7486e5689b83e3bed92ae17c6ccce025007cb2262a031e3b06e2bd17784bfdae"}}},
  16. "Ports" => [%{"PrivatePort" => 443, "Type" => "tcp"},
  17. %{"PrivatePort" => 80, "Type" => "tcp"}], "State" => "running",
  18. "Status" => "Up 59 seconds"}]

Docs

https://pivstone.github.io/docker_client/readme.html