Docker Community Forums

Share and learn in the Docker community.

How do you install and configure Docker overlay?

docker

(Mike812) #1

What is the recommended key-value store for Docker overlay?

I will use only one server. I just want it up and running. I don’t need anything fancy. I think I have exactly three choices: etcd, Zookeeper, or Consul. Are there others? Which is preferred and easiest to set up?

Is there a recommended comprehensive installation document for Docker overlay other than what is on docs.docker.com?


(Nathan Le Claire) #2

If you will have only one server, why bother with overlay network driver? It’s mostly meant for communication across hosts.


(Mike812) #3

I want my Docker containers to have unique IP addresses.


(Nathan Le Claire) #4

Can you use the default unique IP addresses on the docker0 bridge?

e.g.

$ docker run -d -P nginx
af2ee3a14166ab0539e24bc739897136a12e5bb2758f1e0963435a4b7430b45a
$ docker inspect -f '{{.NetworkSettings.IPAddress}}' $(docker ps -lq)
172.17.0.2

At any rate, a better question is, why do you want your containers to have unique IP addresses in the first place? If they need to communicate they can go on the same docker network.


(Mike812) #5

No, the default IP addresses won’t work. Workstations will retrieve files from the Docker containers. The IP addresses must be unique and addressable over a large network.


(Nathan Le Claire) #6

How will overlay help you with that?

Sounds like you might want to rig up something like Interlock or your own proxy layer to proxy inbound traffic to the proper containers using DNS with wildcard, custom route settings, etc. (whatever works best for your use case)

Setting up a network-addressable IP address for each container will require SDN acrobatics that I’m not sure overlay supports out of the box. overlay driver is really, really, heavily oriented towards communication between containers.


(Mike812) #7

Thanks. I suppose Docker overlay may not help me. Must I install Swarm, HAProxy and Nginx? I’d rather not install Swarm. I’m curious if I have other options.

Does Docker Inc. recommend a method? It seems like interlock isn’t an official product. But it seems reliable and from a trustworthy source.


(Nathan Le Claire) #8

I think Interlock will work without Swarm, even though it’s mostly designed to be used with Swarm. Swarm is essentially a reverse proxy to the Engine, so skipping the intermediate reverse proxy should be fine if you’re not doing anything too fancy. Also, you will only need one of either HAProxy or nginx, not both, and should run in a container if you use Evan’s image (or build it yourself from scratch).

Interlock was written and maintained by Evan Hazlett, who works for Docker, Inc. and is generally a smart and affable guy. It’s frequently referenced by Docker sales engineers in suggested architectures, so as far as Docker downstreams go, it’s a pretty safe bet.