I’m new at docker. I try to read all about it. But I don’t understand something about linking services between containers.
First this is the setup I’m using :
- Vmware Workstation 12 on a Windows 10 1709 host machine
- Docker 17.09.1-ce on a virtual Ubuntu 16.04 server host.
- Rancher for the containers management
My big question is : How to link the services between containers?
I create a stack on Rancher with these 2 containers :
- hugojosefson/ubuntu-gnome:17.04 with IP 10.42.212.125/16 (called it Ubuntu-Home for purpose)
- rastasheep/ubuntu-sshd:16.04 as sidekick with IP 10.42.141.207/16 called it Ubuntu-sshd (I know! It’s a pretty wild network range!)
This is the thing I want to do :
- My Ubuntu-Home don’t have a ssh server on it. So I created a stack of this container + a sshd-server container.
All both of the containers can contact each other because now, they are in the same network
How can I tell my Ubuntu-Home : Hey use openssh-server on the other container in the same network?
I’m a little bit confused about that