Skip to content

Commit

Permalink
Updated docker-compose.md (rstacruz#1827)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaw3l authored May 20, 2022
1 parent e7d44f5 commit b86ebd8
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ version: '2'

services:
web:
build: .
build:
# build from Dockerfile
context: ./Path
dockerfile: Dockerfile
context: ./Path
dockerfile: Dockerfile
ports:
- "5000:5000"
volumes:
Expand Down Expand Up @@ -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:
Expand All @@ -230,3 +230,15 @@ networks:
volumes:
dbdata:
```
### User
```yaml
# specifying user
user: root
```
```yaml
# specifying both user and group with ids
user: 0:0
```

0 comments on commit b86ebd8

Please sign in to comment.