docker-compose: add networking (#876)

This commit is contained in:
Mateus Pontes 2018-11-16 17:54:03 -02:00 committed by chad d
parent 5268d69e3c
commit 75740e2658
1 changed files with 18 additions and 0 deletions

View File

@ -196,3 +196,21 @@ services:
extra_hosts:
- "somehost:192.168.1.100"
```
### Network
```yaml
# creates a custom network called `frontend`
networks:
frontend:
```
### External network
```yaml
# join a pre-existing network
networks:
default:
external:
name: frontend
```