-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmod.rs
More file actions
37 lines (35 loc) · 1.06 KB
/
mod.rs
File metadata and controls
37 lines (35 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Docker CLI client for executing Docker commands
//!
//! This module provides a `DockerClient` that wraps Docker CLI operations using our
//! `CommandExecutor` abstraction. This enables testability and consistency with other
//! external tool clients (Ansible, `OpenTofu`, LXD).
//!
//! # Architecture
//!
//! - `client.rs` - Main Docker client with one method per Docker subcommand
//! - `error.rs` - Docker-specific error types with actionable messages
//!
//! # Example
//!
//! ```rust,no_run
//! use torrust_tracker_deployer_lib::adapters::docker::DockerClient;
//!
//! # fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let docker = DockerClient::new();
//!
//! // Build a Docker image
//! docker.build_image("docker/ssh-server", "my-app", "latest")?;
//!
//! // Check if image exists
//! let exists = docker.image_exists("my-app", "latest")?;
//! assert!(exists);
//!
//! // List all containers
//! let containers = docker.list_containers(true)?;
//! # Ok(())
//! # }
//! ```
pub mod client;
pub mod error;
pub use client::DockerClient;
pub use error::DockerError;