No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example All Jan 12, 2015
.travis.yml More verbose travis Feb 11, 2015
CMakeLists.txt
LICENSE All Jan 12, 2015
README.md Changed readme Feb 11, 2015
appveyor.yml App veyor, last windows Jan 12, 2015
bii_deps_config.cmake
biicode.conf
client.cpp All Jan 12, 2015
client.h All Jan 12, 2015

README.md

C++ Docker Client

Build Status

lasote/docker_client

Docker Rest API v1.16 implementation with C++11 using lambda functions for callbacks.

This library is hosted in Biicode C++ dependency manager.

Biicode block lasote/docker_client

Also in github repository https://github.com/lasote/docker_client

Build status

Visual Studio 2012: Build status

Linux gcc: Build Status

Also working with: Windows with MinGW >=4.8, OSx with Clang > 6.0

Want to try it?

The project has many dependencies, we recommend you to use biicode to handle them:

Get started with biicode

Include this header in your source code file:

#include "lasote/docker_client/client.h"

Download the required dependencies:

bii find

Build the project:

bii cpp:build # to build the project

Take a look to the example: http://www.biicode.com/examples/docker_client

How to use it

DockerClient client("http://localhost:4243");

// Error callback for all examples
ERR_F error_cb = [] (int status, string desc) {
  cout << "Error: " << status <<  endl  << desc;
};

auto c5 = client.logs_container([] (string out) {
  cout << "Response: " << out << endl;
}, error_cb, "c7ddced66641", true, true, true, true, "all");


auto c6 = client.list_containers([] ( jsonxx::Object ret) {
  cout << "Containers: " << ret.json() << endl;
}, error_cb, false, 13);

auto c7 = client.list_images([] ( jsonxx::Object ret) {
  cout << "Images: " << ret.json() << endl;
}, error_cb); 

// Its based on libuv event loop, so, run all the requests
run_loop();