From 48077e3b5b16088df399aa8f9241aa002e9f32e4 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Mon, 14 Jul 2014 23:19:37 +0000 Subject: [PATCH] Update /etc/hosts when linked container is restarted Docker-DCO-1.1-Signed-off-by: Victor Vieux (github: vieux) Upstream-commit: bbea6aa42d6d5a026933208082cb6009a6d60b94 Component: cli --- components/cli/docs/sources/reference/run.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/cli/docs/sources/reference/run.md b/components/cli/docs/sources/reference/run.md index a933a32bea..6dc7b40721 100644 --- a/components/cli/docs/sources/reference/run.md +++ b/components/cli/docs/sources/reference/run.md @@ -432,6 +432,9 @@ mechanism to communicate with a linked container by its alias: $ docker run -d --name servicename busybox sleep 30 $ docker run -i -t --link servicename:servicealias busybox ping -c 1 servicealias +If you restart the source container (`servicename` in this case), the recipient +container's `/etc/hosts` entry will be automatically updated. + ## VOLUME (Shared Filesystems) -v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro].