From b86ebd89680915e1f540828265c1759ace173f65 Mon Sep 17 00:00:00 2001 From: jaw3l <16852455+jaw3l@users.noreply.github.com> Date: Fri, 20 May 2022 05:43:57 +0300 Subject: [PATCH] Updated docker-compose.md (#1827) --- docker-compose.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/docker-compose.md b/docker-compose.md index b2ee4c0678..20a846f536 100644 --- a/docker-compose.md +++ b/docker-compose.md @@ -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: @@ -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 +```