Is it possible to link existing containers with docker?

Is it possible to create a container with docker run <image>no option --linkand associate other containers with it after that? If so, how can I bind these containers, then?

+4
source share
2 answers

Of course, yes, but you can only access other containers using ip (usually 172.17.1.x). you can use

docker inspect container_id

to find other ip containers.

+1
source

. A B --link B:resourcename. B A EXPOSE s, , env ( - resourcename.

( , ). , , . ( ..).

+1

All Articles