From a8b93a59ea1bf3fa5206f7b9cf3aa68712afca64 Mon Sep 17 00:00:00 2001 From: James Gentes Date: Fri, 13 Apr 2018 10:57:12 -0700 Subject: [PATCH] Added note to 'ports' section: Port mapping is incompatible with `network_mode: host` Took a while to figure this one out. Source: https://github.com/docker/compose/issues/4799#issuecomment-299605031 --- compose/compose-file/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index 6f4ac4779b..f332495f6c 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -1380,6 +1380,8 @@ containers in the bare-metal machine's namespace and vise-versa. Expose ports. +> **Note:** Port mapping is incompatible with `network_mode: host` + #### Short syntax Either specify both ports (`HOST:CONTAINER`), or just the container