Updated docker-compose.md (#1827)
This commit is contained in:
parent
e7d44f5f8c
commit
b86ebd8968
|
@ -15,7 +15,7 @@ version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
build: .
|
build:
|
||||||
# build from Dockerfile
|
# build from Dockerfile
|
||||||
context: ./Path
|
context: ./Path
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
@ -220,7 +220,7 @@ networks:
|
||||||
### Volume
|
### Volume
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Mount host paths or named volumes, specified as sub-options to a service
|
# mount host paths or named volumes, specified as sub-options to a service
|
||||||
db:
|
db:
|
||||||
image: postgres:latest
|
image: postgres:latest
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -230,3 +230,15 @@ networks:
|
||||||
volumes:
|
volumes:
|
||||||
dbdata:
|
dbdata:
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### User
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# specifying user
|
||||||
|
user: root
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# specifying both user and group with ids
|
||||||
|
user: 0:0
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue