services:
web:
- build: .
+ build:
# build from Dockerfile
- context: ./Path
- dockerfile: Dockerfile
+ context: ./Path
+ dockerfile: Dockerfile
ports:
- "5000:5000"
volumes:
### 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:
volumes:
dbdata:
```
+
+### User
+
+```yaml
+# specifying user
+user: root
+```
+
+```yaml
+# specifying both user and group with ids
+user: 0:0
+```