Updated docker-compose.md (#1827)

This commit is contained in:
jaw3l 2022-05-20 05:43:57 +03:00 committed by GitHub
parent e7d44f5f8c
commit b86ebd8968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 4 deletions

View File

@ -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
```