Skip to content

[SRVLOGIC-1069] Migrate Docker APIs v28 to Moby v1.55.0 and Moby Client v0.5.0#20

Merged
ricardozanini merged 2 commits into
main-1.xfrom
srvlogic-1069-moby-migration
Jun 29, 2026
Merged

[SRVLOGIC-1069] Migrate Docker APIs v28 to Moby v1.55.0 and Moby Client v0.5.0#20
ricardozanini merged 2 commits into
main-1.xfrom
srvlogic-1069-moby-migration

Conversation

@ricardozanini

Copy link
Copy Markdown
Contributor

Summary

Migrates from github.com/docker/docker v28.5.2+incompatible to github.com/moby/moby/client v0.5.0 and github.com/moby/moby/api v1.55.0 to address critical CVEs.

Security Fixes

Packages Migrated

  1. container-builder
  2. cli

Key Changes

Same migration as applied to kie-tools repository (PR #385).

API Updates

  • Client creation: client.NewClientWithOpts()client.New()
  • Container operations: Now use client.ContainerCreateOptions struct
  • List operations: Return Result objects with .Items field
  • Port mappings: nat.Portnetwork.Port (use network.MustParsePort())
  • IP addresses: stringnetip.Addr (use netip.MustParseAddr())
  • Filters: filters.NewArgs()client.Filters{}
  • Wait operations: Return result with .Error and .Result channels
  • Container inspect: Returns ContainerInspectResult with .Container field
  • Error checking: client.IsErrNotFound()errdefs.IsNotFound()
  • Image pull: Returns io.ReadCloser with .Wait() method

Files Modified (13 total)

container-builder:

  • go.mod - Updated dependencies
  • common/docker.go - Refactored Docker client operations
  • common/registry_docker.go - Updated container/registry operations
  • common/registry.go - Updated imports
  • builder/kaniko_vanilla.go - Updated Kaniko builder
  • cleaner/docker_integration_test_suite.go - Enhanced test cleanup

cli:

  • go.mod - Updated dependencies
  • pkg/common/containers.go - Refactored Docker client operations
  • pkg/common/containers_test.go - Updated test mocks
  • pkg/common/checks.go - Updated Docker client checks

Test Results

container-builder

  • ✅ Build: SUCCESS
  • ✅ Tests: PASS

cli

  • ✅ Build: SUCCESS
  • ✅ Tests: 5/5 PASS

Breaking Changes

None - all functionality preserved, only internal API calls updated.

Compatibility

  • Go version: Compatible with Go 1.26.0 (requires Go 1.24+)
  • Moby API: v1.55.0
  • Moby Client: v0.5.0

Notes

  • All existing tests pass with the new API
  • No functional changes to the operator or CLI behavior
  • CVEs resolved by upgrading to v29 which includes security patches
  • Migration applied from kie-tools repository

🤖 Generated with Claude Code

@ricardozanini

Copy link
Copy Markdown
Contributor Author

I need to enable CI in this branch on Monday.

@ricardozanini ricardozanini force-pushed the srvlogic-1069-moby-migration branch from 535dcaf to 35f1f92 Compare June 29, 2026 19:39
…nt v0.5.0

Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
@ricardozanini ricardozanini force-pushed the srvlogic-1069-moby-migration branch from 35f1f92 to ee6d5dd Compare June 29, 2026 20:44
@ricardozanini ricardozanini merged commit 0b5b4ed into main-1.x Jun 29, 2026
9 checks passed
@ricardozanini ricardozanini deleted the srvlogic-1069-moby-migration branch June 29, 2026 21:05
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