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

Docker compose links flag is deprecated, but still used #813

Closed
tmotyl opened this issue Apr 26, 2018 · 4 comments
Closed

Docker compose links flag is deprecated, but still used #813

tmotyl opened this issue Apr 26, 2018 · 4 comments

Comments

@tmotyl
Copy link
Contributor

tmotyl commented Apr 26, 2018

What happened (or feature request):

According to the docker documentation "links" flag is deprecated. It is still used in ddev composer yaml
e.g.

web:
    links:
      - db:db

https://docs.docker.com/compose/compose-file/#links

@rfay
Copy link
Member

rfay commented May 1, 2018

Color me surprised; I tried to just remove those links stanzas because https://docs.docker.com/compose/compose-file/#links basically says they're not useful.

But things blow up in quite surprising ways; it looks like other projects' db servers are being hit randomly. So a Drupal install starts but fails partway through, it hits "variable table already exists", implying that it is suddenly hitting the wrong "db" container.

The doc says:

Links are not required to enable services to communicate - by default, any service can reach any other service at that service’s name.

So it seems there would be no reason for the stanza at all. But it seems there is. Things work perfectly when it's reintroduced.

@rfay rfay added the hibernate label May 1, 2018
@rfay
Copy link
Member

rfay commented May 1, 2018

This is a totally valid issue, but I don't think it's going to be worth pursuing until we're forced to pursue it, so flagging hibernate.

@rfay rfay removed the hibernate label Oct 25, 2019
@rfay
Copy link
Member

rfay commented Oct 25, 2019

There may be a docker bug here.

People have been having trouble with solr being accidentally shared between projects, and removing links from this solr recipe does not solve that problem:

https://github.com/drud/ddev/blob/1bdcde384c610b3b17834585b1292580fdafe299/pkg/servicetest/testdata/services/docker-compose.solr.yaml#L63-L68

@rfay
Copy link
Member

rfay commented Mar 10, 2022

As of v1.19, the links: stanza is no longer used. Thanks for this issue!

@rfay rfay closed this as completed Mar 10, 2022
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

No branches or pull requests

2 participants