Docker Wrapper
A comprehensive Docker CLI wrapper for Rust with complete command coverage.
Features
- 13 Docker commands with 100%+ option coverage
- 393 comprehensive tests (unit, integration, doctests)
- Async-first with tokio integration
- Builder patterns for all commands
- Type-safe error handling
- Zero unsafe code
Commands
Command | Options | Description |
---|---|---|
run |
108 methods | Container execution with full option support |
build |
54 methods | Image building with Dockerfile support |
exec |
16 methods | Execute commands in running containers |
images |
25 methods | List and manage images |
ps |
18 methods | List containers with filtering |
pull |
10 methods | Pull images from registries |
push |
10 methods | Push images to registries |
search |
22 methods | Search Docker Hub |
login |
10 methods | Registry authentication |
logout |
8 methods | Registry logout |
bake |
28 methods | Buildx bake support |
version |
13 methods | Docker version information |
info |
19 methods | Docker system information |
Installation
[]
= "0.1.0"
= { = "1.0", = ["macros", "rt-multi-thread"] }
Quick Start
use *;
async
Architecture
Each command implements the DockerCommand
trait with:
- Builder pattern for configuration
run()
method for execution- Typed output parsing
- Comprehensive error handling
// All commands follow this pattern
let result = new
.option1
.option2
.run
.await?;
Examples
See examples/ directory for comprehensive usage examples:
- Basic container operations
- Advanced build configurations
- Registry operations
- Error handling patterns
Documentation
- API Documentation - Complete API reference
- Examples - Usage examples for all commands
Testing
# Run all tests
# Run specific command tests
# Check code quality
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.