Skip to content

Fix image load from file descriptor input - #1832

Open
d3v07 wants to merge 1 commit into
apple:mainfrom
d3v07:fix/image-load-dev-fd-input
Open

Fix image load from file descriptor input#1832
d3v07 wants to merge 1 commit into
apple:mainfrom
d3v07:fix/image-load-dev-fd-input

Conversation

@d3v07

@d3v07 d3v07 commented Jun 25, 2026

Copy link
Copy Markdown

Summary

  • Stage descriptor-backed image load inputs before calling the image service.
  • Keep regular --input paths direct to avoid unnecessary copying.
  • Add focused coverage for regular files, non-regular files, /dev/fd/<n>, and archive copy behavior.

Root cause

container image load --input /dev/fd/N accepts a path that is only meaningful in the CLI process. The image service process cannot reopen that caller-owned descriptor, so the load fails before it can consume the archive.

Fixes #1429.

Validation

  • swift build --target ContainerCommands
  • swift format lint --recursive Sources/ContainerCommands/Image/ImageLoad.swift Tests/ContainerCommandsTests/ImageLoadTests.swift
  • git diff --check

I also ran swift test --filter ImageLoadTests, but this local environment fails before the filtered test target runs because the active developer directory is Command Line Tools and the test build cannot import Testing/XCTest. BUILDING.md documents Xcode 26 as the required active developer directory.

@d3v07
d3v07 force-pushed the fix/image-load-dev-fd-input branch from 854db14 to ce8d26b Compare June 25, 2026 17:49
@d3v07
d3v07 marked this pull request as ready for review June 25, 2026 17:55
stephenlclarke added a commit to stephenlclarke/container-compose that referenced this pull request Jul 12, 2026
Supports Docker Compose cp - archive streams for stdin-to-service and service-to-stdout copies by staging tar streams through the compose layer and existing Apple path-copy APIs.

Pins stephenlclarke/containerization@79b675d so the runtime carries the apple/container#1927 copy lifecycle regression coverage from apple/containerization#799.

Upstream scan found no direct Docker Compose copy-stream PR to import; adjacent Apple work reviewed: apple/container#963, apple/containerization#652, apple/container#1832, apple/container#1905.

Release-Highlight: Support Docker Compose cp - archive streams for stdin-to-service and service-to-stdout copies; includes apple/container#1927 copy lifecycle fix via apple/containerization#799.
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.

[Request]: container image load fails to read from file descriptor

1 participant