fix: add NetworkConnect fallback for API < 1.44
For Docker daemons older than API 1.44, the extra networks omitted from ContainerCreate must be connected individually after creation via NetworkConnect. If any NetworkConnect call fails, remove the freshly created container to prevent orphans. Add two tests: - TestCreateMobyContainerLegacyAPI: happy path verifying NetworkConnect is called for the secondary network on API 1.43 - TestCreateMobyContainerLegacyAPI_NetworkConnectFailure: verifies ContainerRemove is called with Force when NetworkConnect fails Signed-off-by: jarek <jkrochmalski@gmail.com>
J
jarek committed
a97738de7dd9d14fcf98b4ef3528c417dabe77d3
Parent: 3b1004c
Committed by Guillaume Lours <705411+glours@users.noreply.github.com>
on 3/31/2026, 1:44:00 PM