From 8bea4f455550e53e4a53eda7caaa56cca61ee71d Mon Sep 17 00:00:00 2001 From: Jim Alateras Date: Wed, 4 Mar 2015 17:03:42 +1100 Subject: [PATCH] Add some links on linking and volumes --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index cd6a151..8f54e54 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,8 @@ And you can connect to it that way. To delete links, use `docker rm --link `. +If you want to link across docker hosts then you should look at [Swarm](http://docs.docker.com/swarm/). This [link on stackoverflow](http://stackoverflow.com/questions/21283517/how-to-link-docker-services-across-hosts) provides some good information on different patterns for linking containers across docker hosts. + ## Volumes Docker volumes are [free-floating filesystems](http://docs.docker.com/userguide/dockervolumes/). They don't have to be connected to a particular container. You should use volumes mounted from [data-only containers](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e) for portability. @@ -281,6 +283,8 @@ docker run -v /Users/wsargent/myapp/src:/src You can also use remote NFS volumes if you're [feeling brave](http://www.tech-d.net/2014/03/29/docker-quicktip-4-remote-volumes/). +You may also consider running data-only containers as described [here](http://container42.com/2013/12/16/persistent-volumes-with-docker-container-as-volume-pattern/) to provide some data portability. + ## Exposing ports Exposing incoming ports through the host container is [fiddly but doable](https://docs.docker.com/reference/run/#expose-incoming-ports).