Skip to content

Support multiple values for extra_hosts#678

Merged
ndeloof merged 1 commit intocompose-spec:mainfrom
ndeloof:extra_hosts
Sep 3, 2024
Merged

Support multiple values for extra_hosts#678
ndeloof merged 1 commit intocompose-spec:mainfrom
ndeloof:extra_hosts

Conversation

@ndeloof
Copy link
Copy Markdown
Collaborator

@ndeloof ndeloof commented Sep 2, 2024

This PR adds support for multiple-value set by extra_hosts, either with long syntax or single line syntax, using a coma separator between IPs in value. Unicity doesn't apply to extra_hosts as this docker run flag actually supports multiple values per key being set, so it was wrong for compose to consider an override.

closes docker/compose#12088

@ndeloof ndeloof requested a review from jhrotko September 2, 2024 15:33
@ndeloof ndeloof marked this pull request as draft September 2, 2024 15:35
@ndeloof ndeloof removed the request for review from jhrotko September 2, 2024 15:35
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof requested a review from jhrotko September 2, 2024 15:49
@ndeloof ndeloof marked this pull request as ready for review September 2, 2024 17:18
Copy link
Copy Markdown
Collaborator

@jhrotko jhrotko left a comment

Choose a reason for hiding this comment

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

LGTM

@ndeloof ndeloof merged commit 6b514a8 into compose-spec:main Sep 3, 2024
@ndeloof ndeloof deleted the extra_hosts branch September 3, 2024 14:37
@tate-button
Copy link
Copy Markdown

big thanks @ndeloof it's much appreciated

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replicate --add-host behavior with extra_hosts

3 participants