docker_api 0.0.6

Docker-API #

Work in Progress...

Changelog #

0.0.6 #

  • Fixes

0.0.5 #

  • Fixes

0.0.4 #

  • Get All Containers

0.0.3 #

  • Fixes

0.0.2 #

  • Server Usage
  • Container Info:
    • Envs
    • Mounts
    • Ports
  • Container Stats

0.0.1 #

  • Initial version

example/example.dart

import 'package:docker_api/docker_api.dart';

void main() async {
  var api = await DockerAPI.connectRemoteWithBasicAuth(
      'http://server:8099/', 'user', 'password');

  print(api.kernelVersion);
  print(api.imagesDiskUsageBytes);
  print(api.imagesDiskUsageKB);
  print(api.imagesDiskUsageMB);
  print(api.imagesDiskUsageGB);
  print(api.containersDiskUsageBytes);
  print(api.containersDiskUsageKB);
  print(api.containersDiskUsageMB);
  print(api.containersDiskUsageGB);
  print(api.volumesDiskUsageBytes);
  print(api.volumesDiskUsageKB);
  print(api.volumesDiskUsageMB);
  print(api.volumesDiskUsageGB);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  docker_api: ^0.0.6

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:docker_api/docker_api.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
17
Health:
Code health derived from static analysis. [more]
95
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
51
Learn more about scoring.

We analyzed this package on Feb 11, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Fix lib/src/docker_api_base.dart. (-3.93 points)

Analysis of lib/src/docker_api_base.dart reported 8 hints, including:

line 103 col 12: Unnecessary new keyword.

line 117 col 15: Unnecessary new keyword.

line 133 col 15: Unnecessary new keyword.

line 145 col 36: Don't explicitly initialize variables to null.

line 150 col 30: Don't explicitly initialize variables to null.

Fix lib/src/docker_container.dart. (-1.49 points)

Analysis of lib/src/docker_container.dart reported 3 hints:

line 103 col 20: Unnecessary new keyword.

line 116 col 15: Unnecessary new keyword.

line 123 col 12: Unnecessary new keyword.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
dio ^3.0.8 3.0.8
Transitive dependencies
charcode 1.1.3
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6