Skip to content

chore(deps): Upgrade Docker to v28.2.2 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 16, 2025
Merged

Conversation

knqyf263
Copy link
Collaborator

Summary

  • Upgrade Docker dependency from v26.1.3 to v28.2.2+incompatible
  • Fix compilation error in engine/image/router.go by migrating to OCI-compliant configuration
  • Maintain backward compatibility while adopting modern Docker image specifications

Changes

  • Update go.mod to use Docker v28.2.2+incompatible
  • Replace container.Config with DockerOCIImageConfig in ImageInspect.Config field
  • Preserve healthcheck, OnBuild, and Shell configurations in Docker extensions
  • Simplify code by removing unused variables and imports
  • Keep deprecated ContainerConfig field for backward compatibility

- Update Docker dependency from v26.1.3 to v28.2.2+incompatible
- Fix compilation error by migrating Config field to DockerOCIImageConfig
- Replace container.Config with OCI-compliant image configuration
- Preserve healthcheck, OnBuild, and Shell configurations in Docker extensions
- Remove unused imports and simplify variable names
- Maintain backward compatibility with deprecated ContainerConfig field
@knqyf263 knqyf263 requested a review from Copilot June 13, 2025 13:01
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the Docker dependency and migrates the image configuration to an OCI-compliant format while retaining backward compatibility.

  • Updated dependency versions in go.mod
  • Migrated from container.Config to DockerOCIImageConfig in the image router
  • Removed unused variables and imports for cleanup

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
go.mod Updated Docker and containerd dependencies alongside other minor updates
engine/image/router.go Migrated image configuration to OCI-compliant format and simplified code by removing unused fields and imports
Comments suppressed due to low confidence (3)

engine/image/router.go:102

  • Consider adding a comment here to explain why exposedPorts has been converted to a map from nat.PortSet, which clarifies the intent for compatibility with DockerOCIImageConfig.
exposedPorts := map[string]struct{}{}

engine/image/router.go:112

  • Please add an inline comment explaining the transformation of volumes into a map, so future maintainers understand its intended use in the OCI image configuration.
volumes := map[string]struct{}{}

go.mod:18

  • Verify that replacing the dependency on containerd/containerd with containerd/errdefs is intentional and that it satisfies all indirect references within the project.
github.com/containerd/errdefs v1.0.0 // indirect

@knqyf263 knqyf263 changed the title Upgrade Docker to v28.2.2 chore(deps): Upgrade Docker to v28.2.2 Jun 13, 2025
@knqyf263 knqyf263 marked this pull request as ready for review June 13, 2025 13:24
@knqyf263 knqyf263 requested review from nikpivkin and DmitriyLewen and removed request for nikpivkin June 13, 2025 13:24
@knqyf263 knqyf263 self-assigned this Jun 13, 2025
Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
left small comment

Healthcheck: healthcheck,
OnBuild: config.Config.OnBuild,
Shell: config.Config.Shell,
},
}
inspect := types.ImageInspect{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types.InspectResponse is deprecated. Use "github.com/docker/docker/api/types/image".

Suggested change
inspect := types.ImageInspect{
inspect := image.InspectResponse{

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7df7626

@DmitriyLewen DmitriyLewen merged commit ba6845a into main Jun 16, 2025
5 checks passed
@DmitriyLewen DmitriyLewen deleted the upgrade-docker-v28 branch June 16, 2025 06:07
knqyf263 added a commit to knqyf263/trivy that referenced this pull request Jun 16, 2025
This commit updates the daemon package to be compatible with Docker v28
by addressing breaking changes introduced in Docker API v1.46.

Changes made:
- Replace deprecated ImageInspectWithRaw with ImageInspect API
- Remove deprecated container configuration fields from image config
- Update dependencies to Docker v28.2.2
- Update testdocker to v0.0.0-20250616060700-ba6845ac6d17 which includes
  Docker v28 compatibility fixes (aquasecurity/testdocker#26)
- Simplify imageConfig function to use only OCI-compliant fields

Breaking changes addressed:
Docker API v1.46 removed the following fields from image inspection Config:
- Hostname, Domainname, AttachStdin, AttachStdout, AttachStderr
- Tty, OpenStdin, StdinOnce, Image, NetworkDisabled, MacAddress

These fields were implementation details and not part of the OCI image
specification. The removal aligns Docker with the OCI standard.

Test updates:
- Update test expectations to match new API behavior
- Remove assertions for deprecated fields that are no longer returned

Fixes: Docker v28 compatibility issues
knqyf263 added a commit to knqyf263/trivy that referenced this pull request Jun 16, 2025
This commit updates the daemon package to be compatible with Docker v28
by addressing breaking changes introduced in Docker API v1.46.

Changes made:
- Replace deprecated ImageInspectWithRaw with ImageInspect API
- Remove deprecated container configuration fields from image config
- Update dependencies to Docker v28.2.2
- Update testdocker to v0.0.0-20250616060700-ba6845ac6d17 which includes
  Docker v28 compatibility fixes (aquasecurity/testdocker#26)
- Simplify imageConfig function to use only OCI-compliant fields

Breaking changes addressed:
Docker API v1.46 removed the following fields from image inspection Config:
- Hostname, Domainname, AttachStdin, AttachStdout, AttachStderr
- Tty, OpenStdin, StdinOnce, Image, NetworkDisabled, MacAddress

These fields were implementation details and not part of the OCI image
specification. The removal aligns Docker with the OCI standard.

Test updates:
- Update test expectations to match new API behavior
- Remove assertions for deprecated fields that are no longer returned

Fixes: Docker v28 compatibility issues
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.

2 participants