docker-compose: add networking (#876)
This commit is contained in:
parent
5268d69e3c
commit
75740e2658
|
@ -196,3 +196,21 @@ services:
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "somehost:192.168.1.100"
|
- "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
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue