aboutsummaryrefslogtreecommitdiff
path: root/content/en/blog/docker/docker-compose-bridge.md
diff options
context:
space:
mode:
authorJulien Dessaux2020-04-28 17:29:52 +0200
committerJulien Dessaux2020-04-28 17:29:52 +0200
commit6cc9d8c72a56563b6d1a12b8b441dfa9dde345e9 (patch)
tree042852f7a8a18f65c8d5191234c8ed1cb85fd8a4 /content/en/blog/docker/docker-compose-bridge.md
parentInitial import (diff)
downloadwww-6cc9d8c72a56563b6d1a12b8b441dfa9dde345e9.tar.gz
www-6cc9d8c72a56563b6d1a12b8b441dfa9dde345e9.tar.bz2
www-6cc9d8c72a56563b6d1a12b8b441dfa9dde345e9.zip
Long overdue first commit with content
Diffstat (limited to 'content/en/blog/docker/docker-compose-bridge.md')
-rwxr-xr-xcontent/en/blog/docker/docker-compose-bridge.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/content/en/blog/docker/docker-compose-bridge.md b/content/en/blog/docker/docker-compose-bridge.md
new file mode 100755
index 0000000..16a823d
--- /dev/null
+++ b/content/en/blog/docker/docker-compose-bridge.md
@@ -0,0 +1,31 @@
+---
+title: "Docker compose predictable bridge"
+linkTitle: "Docker compose predictable bridge"
+date: 2018-09-25
+description: >
+ How to use a predefined bridge with docker compose
+---
+
+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 :
+
+{{< highlight yaml >}}
+version: '3.0'
+
+services:
+ sshportal:
+ image: moul/sshportal
+ environment:
+ - SSHPORTAL_DEFAULT_ADMIN_INVITE_TOKEN=integration
+ command: server --debug
+ depends_on:
+ - testserver
+ ports:
+ - 2222
+ network_mode: "bridge"
+networks:
+ default:
+ external:
+ name: bridge
+{{< /highlight >}}