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

About links at multi host x-networking #2462

Closed
woshihaoren opened this issue Nov 26, 2015 · 1 comment
Closed

About links at multi host x-networking #2462

woshihaoren opened this issue Nov 26, 2015 · 1 comment

Comments

@woshihaoren
Copy link

Hi:
When I use only one docker-compose.yml up several different test environment.

docker-compose -p test --x-networking --x-network-driver overlay up -d
docker-compose -p test1 --x-networking --x-network-driver overlay up -d

WARNING:
"tomcat" defines links, which are not compatible with Docker networking and will be ignored.
Future versions of Docker will not support links - you should remove them for forwards-compatibility。

My application config jdbc://db:3306

docker-compose.yml
tomcat:
image: 'tomcat'
cpu_shares: 22
mem_limit: '1g'
links:
    - 'mysql:db'

mysql:
image: 'mysql'
cpu_shares: 22
mem_limit: '1g'

So container tomcat's hosts doesn't hava db alias, and it's test_mysql_1 test1_mysql_1,they are dynamic. I can's config.

When I use x-networking,How to make an alias?

@dnephin
Copy link

dnephin commented Nov 26, 2015

It's not supported yet. It's being tracked in #2312 and moby/libnetwork#737

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

No branches or pull requests

2 participants