OSDN Git Service

Regular updates
authorErik <erikgronwal@users.osdn.me>
Fri, 20 May 2022 14:55:06 +0000 (23:55 +0900)
committerErik <erikgronwal@users.osdn.me>
Fri, 20 May 2022 14:55:06 +0000 (23:55 +0900)
docker-compose.md

index b2ee4c0..20a846f 100644 (file)
@@ -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
+```