修订版 | 4b38ec1928ab48d74fa526f46a5ff938c364bd8d (tree) |
---|---|
时间 | 2022-05-20 23:55:06 |
作者 | Erik <erikgronwal@user...> |
Commiter | Erik |
Regular updates
@@ -15,10 +15,10 @@ version: '2' | ||
15 | 15 | |
16 | 16 | services: |
17 | 17 | web: |
18 | - build: . | |
18 | + build: | |
19 | 19 | # build from Dockerfile |
20 | - context: ./Path | |
21 | - dockerfile: Dockerfile | |
20 | + context: ./Path | |
21 | + dockerfile: Dockerfile | |
22 | 22 | ports: |
23 | 23 | - "5000:5000" |
24 | 24 | volumes: |
@@ -220,7 +220,7 @@ networks: | ||
220 | 220 | ### Volume |
221 | 221 | |
222 | 222 | ```yaml |
223 | -# Mount host paths or named volumes, specified as sub-options to a service | |
223 | +# mount host paths or named volumes, specified as sub-options to a service | |
224 | 224 | db: |
225 | 225 | image: postgres:latest |
226 | 226 | volumes: |
@@ -230,3 +230,15 @@ networks: | ||
230 | 230 | volumes: |
231 | 231 | dbdata: |
232 | 232 | ``` |
233 | + | |
234 | +### User | |
235 | + | |
236 | +```yaml | |
237 | +# specifying user | |
238 | +user: root | |
239 | +``` | |
240 | + | |
241 | +```yaml | |
242 | +# specifying both user and group with ids | |
243 | +user: 0:0 | |
244 | +``` |