-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: network-scoped alias is supported only for containers in user defined networks #2075
Conversation
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
Codecov Report
@@ Coverage Diff @@
## master #2075 +/- ##
==========================================
+ Coverage 61.22% 61.46% +0.24%
==========================================
Files 46 53 +7
Lines 7141 8780 +1639
==========================================
+ Hits 4372 5397 +1025
- Misses 2462 2955 +493
- Partials 307 428 +121
... and 2 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Thanks for your work. I really need it |
This would solve |
I also ran into the issue that is fixed by this PR. Thank you for fixing it @ChristopherHX Please review and approve! @ALL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this, I only wish my approval mattered ;)
network-scoped alias is supported only for containers in user defined networks Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This Windows only issue is caused by the missing
!n.IsHost()
in then.IsUserDefined()
function for windows. Act sends the network alias for the host network on windows, linux sees that and calls the sameIsUserDefined
(but uses the unix definition on the server side), which detects thehost
network as non user defined network.On linux and macOS it is impossible to reproduce at the time of creating this change. I don't get why windows has it's own definition, but bad maintained.
The actual code uses
IsUserDefined
to detect if network aliases are supported, which didn't work on windows due to the mess in the docker client go library.Thank you docker client.
go\pkg\mod\github.com\docker\docker@v24.0.7+incompatible\api\types\container\hostconfig_unix.go
go\pkg\mod\github.com\docker\docker@v24.0.7+incompatible\api\types\container\hostconfig_windows.go
Why did docker this?
Seems like we have to replace the convenience function with it's unix definition
Important bug fix, I don't have the power