Wednesday, 13 May 2015

Dart POW - ( Package Of The Week) #7 : bwu_docker

Who is ready for another - Dart POW? A weekly look at an interesting Package on pub.dartlang.org

bwu_docker is a provides a typed interface to the Docker REST API and deserializes JSON response to Dart classes.

Code snippet:

...
  // initialize the connection to the Docker service
  final conn = new DockerConnection('localhost', dockerPort);
  await conn.init();

  // create a container from an image
  CreateResponse created = await conn.createContainer(
      new CreateContainerRequest()
    ..image = 'busybox'
    ..hostConfig.logConfig = {'Type': 'json-file'});
...

Feel free to leave a comment with suggestions for the next Dart POW post! Don't be too shy to suggest your own package :-)