mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-22 05:40:50 +02:00
Add some links on linking and volumes
This commit is contained in:
parent
98252757eb
commit
8bea4f4555
1 changed files with 4 additions and 0 deletions
|
@ -261,6 +261,8 @@ And you can connect to it that way.
|
||||||
|
|
||||||
To delete links, use `docker rm --link `.
|
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
|
## 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.
|
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 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 ports
|
||||||
|
|
||||||
Exposing incoming ports through the host container is [fiddly but doable](https://docs.docker.com/reference/run/#expose-incoming-ports).
|
Exposing incoming ports through the host container is [fiddly but doable](https://docs.docker.com/reference/run/#expose-incoming-ports).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue