Container Network Attachment Failure #538
Replies: 1 comment
-
SummaryThe Swift API for Apple's container framework fails to create Expected BehaviorAccording to the /container/documentation/c Actual BehaviorWhen using AttachmentConfiguration objects as documented, Investigation ResultsConfiguration Serialization TestThe configuration itself is valid - it encodes and decodes CLI vs Swift API ComparisonCLI approach: container run --dns 8.8.8.8 --dns 1.1.1.1 colsonwilhoit/test:latest → Works perfectly Swift API with networks: Configuration with AttachmentConfiguration → typeMismatch error Swift API without networks: Configuration with empty networks → Container has no network interface Error LocationThe error occurs inside ClientContainer.create(), not in user Root Cause AnalysisThe error path suggests that somewhere in the container creation
Looking at the source code, ContainerConfiguration has fallback EnvironmentMacOS Version: MacBook Pro Apple M1 - MacOS Tahoe Version 26 Beta (25A5346a) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to do a simple load container, configure it, and run it using the Swift APIs but keep running into an error when the container gets created. I'm not sure if I'm doing something wrong or if its a deserialization bug in the json encoder/decoder. When I don't include any network configuration the container can't access the internet. Below is a section of my code and the error I'm receiving. Help here would be appreciated. I'm somewhat new to Swift so I could be overlooking something simple here. Default kernel works fine, container image loads fine and the dns configuration is written along with the network configuration options I add but when the container goes to run is when the error pops up.
Code:
Error:
Beta Was this translation helpful? Give feedback.
All reactions