Long overdue first commit with content
This commit is contained in:
parent
f63ce5bdd8
commit
6cc9d8c72a
92 changed files with 2031 additions and 97 deletions
31
content/en/blog/docker/docker-compose-bridge.md
Executable file
31
content/en/blog/docker/docker-compose-bridge.md
Executable file
|
@ -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 >}}
|
Loading…
Add table
Add a link
Reference in a new issue