Skip to content

chore: dependency refresh & bollard 0.19 migration#66

Open
drewstone wants to merge 3 commits intomainfrom
drew/dependency-refresh-2026-01
Open

chore: dependency refresh & bollard 0.19 migration#66
drewstone wants to merge 3 commits intomainfrom
drew/dependency-refresh-2026-01

Conversation

@drewstone
Copy link
Contributor

Summary

Comprehensive dependency update and full migration to bollard 0.19 API.

Changes

Dependencies Updated

  • bollard: 0.18 → 0.19 (breaking API changes)
  • tokio: 1.44 → 1.49
  • sysinfo: 0.35.0 → 0.35.2
  • uuid: 1.16 → 1.20
  • tempfile: 3.19 → 3.24
  • Plus 100+ transitive dependency updates via cargo update

Code Migration (bollard 0.19)

Fixed all 9 compilation errors and 143 deprecation warnings:

  • Replaced deprecated bollard::container::Configbollard::models::ContainerCreateBody
  • Replaced deprecated *Options structs → bollard::query_parameters::*Options with builders
  • Updated build_image body type to use bollard::body_full(Bytes::from(...))
  • Fixed list_networks, remove_volume, inspect_container API changes
  • Replaced .as_str() with .as_ref() for ContainerSummaryStateEnum

Files Modified

  • Cargo.toml - Added bytes dependency, updated bollard version
  • src/builder/compose.rs
  • src/builder/docker_file.rs
  • src/builder/management.rs
  • src/container.rs
  • 8 test files

Testing

  • cargo build --all-features
  • cargo test --no-run

Notes

Drew Dahlman added 3 commits January 30, 2026 21:37
This commit updates the docktopus library to use bollard 0.19, which
introduces significant API changes from 0.18. The migration includes:

## Breaking Changes in bollard 0.19:
- Deprecated container/network/volume option structs moved to query_parameters
- Container config moved from bollard::container::Config to bollard::models::ContainerCreateBody
- Network create options moved from bollard::network::CreateNetworkOptions to bollard::models::NetworkCreateRequest
- Volume create options moved from bollard::volume::CreateVolumeOptions to bollard::models::VolumeCreateOptions
- build_image body type changed from Vec<u8> to Either<Full<Bytes>, StreamBody<...>>
- list_networks no longer takes generic parameter
- Several methods now require explicit type annotations for Option<T>
- ContainerSummaryStateEnum.as_str() removed, use AsRef<str>::as_ref() instead

## Changes Made:

### Library (src/):
- builder/compose.rs: Updated to use new query_parameters builders,
  NetworkCreateRequest, VolumeCreateOptions, and body_full() for build context
- builder/docker_file.rs: Updated to use new builders and body_full()
- builder/management.rs: Updated to use new query_parameters and models
- container.rs: Migrated from Config<String> to ContainerCreateBody,
  updated all option types to use query_parameters builders

### Tests (tests/):
- Updated all test files to use new bollard 0.19 API
- common/mod.rs: Updated cleanup logic with new query_parameters
- All test files: Updated to use builders instead of struct literals

### Dependencies (Cargo.toml):
- Added bytes dependency (required for body_full conversion)
- bollard version bumped to 0.19

Note: Docker checkpoint API is NOT available in bollard 0.19.
No checkpoint-related methods were found in the bollard source.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant