Skip to content

[25.0] daemon: only add short cid to aliases for custom networks#47182

Merged
thaJeztah merged 1 commit intomoby:25.0from
akerouanton:25.0-fix-aliases-on-default-bridge
Jan 23, 2024
Merged

[25.0] daemon: only add short cid to aliases for custom networks#47182
thaJeztah merged 1 commit intomoby:25.0from
akerouanton:25.0-fix-aliases-on-default-bridge

Conversation

@akerouanton
Copy link
Member

- What I did

Prior to 7a9b680, the container short ID was added to the network aliases only for custom networks. However, this logic wasn't preserved in 6a2542d and now the cid is always added to the list of network aliases.

This commit reintroduces the old logic.

(cherry picked from commit 9cc48be)

- How to verify it

Manually or through the added integration test.

$ docker run --rm -d --name c0 alpine top
$ docker inspect --format="{{ .NetworkSettings.Networks.bridge.Aliases }}" c0
[]

- Description for the changelog

  • Fix an issue causing containers to have their short ID added to their network alias when inspecting them.

@akerouanton akerouanton added this to the 25.0.1 milestone Jan 23, 2024
@akerouanton akerouanton self-assigned this Jan 23, 2024
Copy link
Contributor

@robmry robmry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akerouanton akerouanton force-pushed the 25.0-fix-aliases-on-default-bridge branch 2 times, most recently from f233023 to fb797ba Compare January 23, 2024 15:46
Prior to 7a9b680, the container short ID was added to the network
aliases only for custom networks. However, this logic wasn't preserved
in 6a2542d and now the cid is always added to the list of network
aliases.

This commit reintroduces the old logic.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
(cherry picked from commit 9f37672)
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
@akerouanton akerouanton force-pushed the 25.0-fix-aliases-on-default-bridge branch from fb797ba to e8801fb Compare January 23, 2024 16:09
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants