Added named volume in docker-compose.md
More info. https://docs.docker.com/compose/compose-file/#volumes
This commit is contained in:
parent
4da6b9adbe
commit
70f39563b4
|
@ -214,3 +214,17 @@ networks:
|
||||||
external:
|
external:
|
||||||
name: frontend
|
name: frontend
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Volume
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Mount host paths or named volumes, specified as sub-options to a service
|
||||||
|
db:
|
||||||
|
image: postgres:latest
|
||||||
|
volumes:
|
||||||
|
- "/var/run/postgres/postgres.sock:/var/run/postgres/postgres.sock"
|
||||||
|
- "dbdata:/var/lib/postgresql/data"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
dbdata:
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue