Skip to content
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

Add links to container create request. #9523

Merged
merged 1 commit into from
Jun 2, 2022

Conversation

laurazard
Copy link
Member

@laurazard laurazard commented Jun 2, 2022

In v1, links were sent alongside the rest of the container create request, as part of HostConfig. In v2, links are usually set on the connect container to network request that happens after the create. However, this only happens if the service has one or more networks defined for it. If the services are configured to use the default bridge network, this request is not made and so links are never configured.

What I did

Add service links to container create request.

Related issue

Resolves #9513

(not mandatory) A picture of a cute animal, if possible in relation with what you did

IMG_2205

Signed-off-by: Laura Brehm laurabrehm@hey.com

In v1, links were sent alongside the rest of the container create request, as part of `HostConfig`. In v2, links are usually set on the connect container to network request that happens after the create. However, this only happens if the service has one or more networks defined for it. If the services are configured to use the default bridge network, this request is not made and so links are never configured.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

@glours glours merged commit c64dbbc into docker:v2 Jun 2, 2022
glours added a commit to glours/compose that referenced this pull request Jun 2, 2022
…iner-create"

This reverts commit c64dbbc, reversing
changes made to e90c6ba.

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
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.

Docker Compose V2 does not provide name resolving for service names
2 participants