Skip to content
pubscout

docker_commander

3.1.0, released 7 weeks ago by an unverified publisher

Docker manager for local and remote host machines to automate Docker Daemons and Swarms.

WASM-ready
$ flutter pub add docker_commander
Source repository

What it does

Automates Docker Daemons and Swarms from Dart, supporting local and remote management, file manipulation inside containers, formulas, and pre-configured popular containers like PostgreSQL, Apache, and NGINX.

AI-written summary of version 3.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to manage Docker containers programmatically from Dart or Flutter.
  • You want to spin up pre-configured services like PostgreSQL or NGINX during development or testing.

Skip it when

  • You do not have access to a Docker daemon or the ability to map the Docker socket.

Strengths

  • Supports both local and remote Docker host management.
  • Includes pre-configured containers and formulas for popular services.
  • Works across multiple platforms.

Weaknesses

  • Requires access to a Docker daemon and proper socket configuration.

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
6

Requires mapping the Docker Host Daemon socket file (/var/run/docker.sock) and a running Docker environment.

import 'package:docker_commander/docker_commander_vm.dart';

void main() async {
  var dockerCommander = DockerCommander(DockerHostLocal());
  await dockerCommander.initialize();
  await dockerCommander.checkDaemon();
  var dockerContainer = await dockerCommander.run('hello-world');
  var exitCode = await dockerContainer.waitExit();
  print('EXIT CODE: $exitCode');
}

Alternatives

Packages that do the same job and could replace docker_commander.

  • docker2

    Dart wrapper for Docker CLI to manage images and containers

Works with

Packages commonly used together with docker_commander: ones it builds on, ones built on it, and its own family.