-
Notifications
You must be signed in to change notification settings - Fork 488
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
Support network scoped service aliases #1087
Support network scoped service aliases #1087
Conversation
6e388ec
to
a955bc8
Compare
a955bc8
to
69ee8ab
Compare
067b878
to
873c1c0
Compare
Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
See https://docs.docker.com/reference/compose-file/services/#network_mode Signed-off-by: Povilas Kanapickas <[email protected]>
This commit takes into account that network_mode won't have networks attribute set, accordingly get_net_args_from_network_mode() can calculate complete net_args easily. Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
Signed-off-by: Povilas Kanapickas <[email protected]>
Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
Note that multiple_nets is now guaranteed to be not empty in processing stage. Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
The behavior has not changed, single-network has a special case. Modified-by: Povilas Kanapickas <[email protected]> Signed-off-by: Songmin Li <[email protected]>
873c1c0
to
681d636
Compare
@lisongmin Thanks for the PR. I will write several comments, but overall it looks good. Please note, that such a PR where all changes are added as a single commit is extremely hard to review. Refactoring is mixed with functionality changes and as a result I would have to replay everything in my head. I've split the PR in small commits that refactor one thing at a time. The end result is almost the same except several deliberate changes. The functionality changes are then way smaller and way easier to review. |
I'm looking into 22454fc to review functionality changes. |
681d636
to
f050dac
Compare
Done. Sorry for the poor PR, thanks for your patience in checking the codes. I learn a lot from it. |
Signed-off-by: Songmin Li <[email protected]>
Signed-off-by: Songmin Li <[email protected]>
When using bridge mode, podman-compose will use the default `podman` network. We do not need to create this network, so just return as other network_mode. Signed-off-by: Songmin Li <[email protected]>
f050dac
to
346f7a5
Compare
To support network scoped aliases, we using the
alias
option in--network
.Since the
--network-alias
will override thealias
set by--network
,we do not using the
--network-alias
any more. All aliases will be setvia
--network
.