Coder Social home page Coder Social logo

docker_client's Introduction

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();

docker_client's People

Contributors

lasote avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.