Updated docker-compose.md (#1827)
This commit is contained in:
parent
e7d44f5f8c
commit
b86ebd8968
|
@ -15,7 +15,7 @@ version: '2'
|
|||
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
build:
|
||||
# build from Dockerfile
|
||||
context: ./Path
|
||||
dockerfile: Dockerfile
|
||||
|
@ -220,7 +220,7 @@ networks:
|
|||
### Volume
|
||||
|
||||
```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:
|
||||
image: postgres:latest
|
||||
volumes:
|
||||
|
@ -230,3 +230,15 @@ networks:
|
|||
volumes:
|
||||
dbdata:
|
||||
```
|
||||
|
||||
### User
|
||||
|
||||
```yaml
|
||||
# specifying user
|
||||
user: root
|
||||
```
|
||||
|
||||
```yaml
|
||||
# specifying both user and group with ids
|
||||
user: 0:0
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue