# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2025-01-25

### Added

- MIT and Apache-2.0 license files
- Comprehensive unit tests for error module
- Unit tests for ContainerBuilder (13 tests covering all builder methods)
- Unit tests for ImageBuilder (10 tests covering all builder methods)
- Integration tests for core functionality
- Total of 35 tests (28 unit tests + 7 integration tests)

### Changed

- Updated documentation URL in Cargo.toml from `docker-client` to `docker-manager`
- Improved test coverage across the crate

### Fixed

- Corrected package name references in documentation

## [0.1.0] - 2025-01-25

### Added

#### Core Features
- Initial release of docker-client crate
- Comprehensive Docker client library built on Bollard 0.19
- Support for Rust 1.70+

#### Container Management
- `DockerClient::containers()` API for container operations
- `ContainerBuilder` with fluent API for creating containers
- `ContainerRef` for managing individual containers
- Container lifecycle operations: create, start, stop, restart, pause, unpause, kill, remove
- Container inspection and status retrieval
- Container log retrieval (streaming and non-streaming)
- Command execution in containers via `exec()`
- Port mapping, environment variables, volume mounts
- Resource limits (memory, CPU)
- Restart policies (always, unless-stopped, on-failure)
- Network attachment
- Container listing and filtering
- Container pruning

#### Image Management
- `DockerClient::images()` API for image operations
- `ImageBuilder` with fluent API for building images from Dockerfiles
- `ImageRef` for managing individual images
- Image pulling with progress tracking
- Image pushing to registries
- Image building from local directories
- Image inspection and listing
- Image removal
- Build context creation with tar archives
- Build cache support
- Multi-stage build support

#### Registry Operations
- `DockerClient::registry()` API for registry management
- `RegistryConfig` for managing registry credentials
- Predefined configurations for Docker Hub and GitHub Container Registry
- Custom registry support
- Image search across registries
- Local image existence checking
- Image tagging
- Image export to tar archives
- Image import from tar archives
- Image pruning with space reclamation tracking
- Registry authentication

#### Network Management
- `DockerClient::networks()` API for network operations
- `NetworkRef` for managing individual networks
- Network creation with custom drivers
- Network listing and inspection
- Container connection/disconnection to networks
- Network removal

#### Volume Management
- `DockerClient::volumes()` API for volume operations
- `VolumeRef` for managing individual volumes
- Volume creation with custom drivers
- Volume listing and inspection
- Volume removal
- Volume pruning

#### Client Configuration
- Multiple connection methods (Unix socket, TCP)
- `DOCKER_HOST` environment variable support
- Configurable timeouts and API versions
- Direct Bollard client access via `inner()`

#### Error Handling
- Comprehensive `DockerError` enum with detailed error variants
- `Result<T>` type alias for ergonomic error handling
- Proper error propagation from Bollard
- Custom error types for specific operations

#### Documentation
- Comprehensive README with examples
- API documentation with rustdoc
- Multiple working examples in `examples/` directory
- Usage guides for all major features

### Examples
- `basic_container.rs` - Basic container lifecycle demonstration
- `build_image.rs` - Image building from Dockerfile
- `list_resources.rs` - Listing all Docker resources
- `registry_operations.rs` - Registry management operations

### Dependencies
- `bollard` 0.19 - Docker daemon API
- `tokio` 1.0 - Async runtime
- `thiserror` 2.0 - Error handling
- `serde` 1.0 - Serialization
- `tracing` 0.1 - Logging
- `tar` 0.4 - Build context creation
- `futures-util` 0.3 - Async utilities
- `bytes` 1.0 - Byte buffer handling
- `http-body-util` 0.1 - HTTP body utilities

## [Unreleased]

### Planned
- Comprehensive integration tests
- Docker Compose support
- Container health checks
- Docker secrets management
- Docker configs support
- Plugin management
- Swarm mode support
- Service management
- Task management
- Additional registry operations (manifest inspection)
- CI/CD pipeline configuration
- Performance benchmarks

[0.2.0]: https://gitlab.com/lemarco/docker-manager/-/releases/v0.2.0
[0.1.0]: https://gitlab.com/lemarco/docker-manager/-/releases/v0.1.0
