diff options
author | Julien Dessaux | 2021-03-11 19:47:26 +0100 |
---|---|---|
committer | Julien Dessaux | 2021-03-11 19:47:26 +0100 |
commit | 1a4981a826bb94c478c6f49721396ec03e02649c (patch) | |
tree | cbd779f6f8e36a28f4d6bd2788c21ce10d9ef122 /content/blog/docker/docker-compose-bridge.md | |
parent | Several fixes (diff) | |
download | www-1a4981a826bb94c478c6f49721396ec03e02649c.tar.gz www-1a4981a826bb94c478c6f49721396ec03e02649c.tar.bz2 www-1a4981a826bb94c478c6f49721396ec03e02649c.zip |
First big articles reformatting now that I properly understand hugo
Diffstat (limited to '')
-rw-r--r-- | content/blog/docker/docker-compose-bridge.md | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/content/blog/docker/docker-compose-bridge.md b/content/blog/docker/docker-compose-bridge.md index 16a823d..f460c6c 100644 --- a/content/blog/docker/docker-compose-bridge.md +++ b/content/blog/docker/docker-compose-bridge.md @@ -1,14 +1,19 @@ --- title: "Docker compose predictable bridge" -linkTitle: "Docker compose predictable bridge" date: 2018-09-25 -description: > - How to use a predefined bridge with docker compose +description: How to use a predefined bridge with docker compose +tags: + - docker + - linux --- +## The problem + By default, docker-compose will create a network with a randomly named bridge. If you are like me using a strict firewall on all your machines, this just cannot work. -You need to put your services in `network_mode: “bridge”` and add a custom `network` entry like : +## The fix + +For example if your bridge is named docbr1, you need to put your services in `network_mode: “bridge”` and add a custom `network` entry like : {{< highlight yaml >}} version: '3.0' @@ -27,5 +32,5 @@ services: networks: default: external: - name: bridge + name: docbr1 {{< /highlight >}} |