Navigation Menu

Skip to content

Commit

Permalink
examples: Fix docker-compose mount points
Browse files Browse the repository at this point in the history
- Add /var/run/netns which is needed for named netns of
  cilium-health ep.
- Document netns related mounts.
- Remove unnecessary /run/docker/plugins mount from cilium-agent
  container, as cilium-agent does not need to access any plugin
  socket.

NOTE: we use `rshared` mount propagation for netns related mounts
to prevent from possibly leaking netns. See for more details:
moby/moby#32090.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
  • Loading branch information
brb authored and ianvernon committed Feb 14, 2019
1 parent 05eeeec commit 7e915b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/getting-started/docker-compose.yml
Expand Up @@ -7,9 +7,11 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/cilium:/var/run/cilium
- /run/docker/plugins:/run/docker/plugins
- /sys/fs/bpf:/sys/fs/bpf
# To access Docker container netns:
- /var/run/docker/netns:/var/run/docker/netns:rshared
# To create named netns for cilium-health endpoint:
- /var/run/netns:/var/run/netns:rshared
network_mode: "host"
cap_add:
- "NET_ADMIN"
Expand Down

0 comments on commit 7e915b3

Please sign in to comment.