From 9875602f37f4f749a53f97405aedf918c52c7fb9 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Tue, 6 Aug 2019 09:20:25 +0100 Subject: [PATCH] Have dind use host's /etc/docker to ensure networks use safe subnets You may have configured Docker to avoid subnets used by your internal infrastructure but we need to ensure that networks created by docker-compose inside dind also respect this. Signed-off-by: James Le Cuirot --- CHANGELOG.md | 1 + src/dind.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8fd758..6e26c76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ version number is tracked in the file `VERSION`. ## Unreleased ### Changed - Small tidyups of environment collection module - PATCH +- Have dind use host's /etc/docker to ensure networks use safe subnets - MINOR ### Added - Forward host working directory as `FLOKI_HOST_WORKDIR` - MINOR diff --git a/src/dind.rs b/src/dind.rs index 9dd5e49..e074dbd 100644 --- a/src/dind.rs +++ b/src/dind.rs @@ -37,6 +37,8 @@ impl Dind { "--name", &self.name, "-v", + "/etc/docker:/etc/docker:ro", + "-v", &format!("{}:{}", self.mount_source, self.mount_target), "-d", "docker:stable-dind",