Browse code

Add missing API docs for "privileged" and "user" exec

The "user" feature was added in docker 1.7.0, and
"privileged" feature was added in docker 1.9.0
only contained CLI docs.

This adds the missing API docs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2016/09/23 06:26:49
Showing 8 changed files
... ...
@@ -1887,15 +1887,13 @@ Sets up an exec instance in a running container `id`
1887 1887
     POST /containers/e90e34656806/exec HTTP/1.1
1888 1888
     Content-Type: application/json
1889 1889
 
1890
-      {
1891
-       "AttachStdin": false,
1892
-       "AttachStdout": true,
1893
-       "AttachStderr": true,
1894
-       "Tty": false,
1895
-       "Cmd": [
1896
-                     "date"
1897
-             ]
1898
-      }
1890
+    {
1891
+      "AttachStdin": true,
1892
+      "AttachStdout": true,
1893
+      "AttachStderr": true,
1894
+      "Cmd": ["sh"],
1895
+      "Tty": true
1896
+    }
1899 1897
 
1900 1898
 **Example response**:
1901 1899
 
... ...
@@ -1965,15 +1965,14 @@ Sets up an exec instance in a running container `id`
1965 1965
     POST /containers/e90e34656806/exec HTTP/1.1
1966 1966
     Content-Type: application/json
1967 1967
 
1968
-      {
1969
-       "AttachStdin": false,
1970
-       "AttachStdout": true,
1971
-       "AttachStderr": true,
1972
-       "Tty": false,
1973
-       "Cmd": [
1974
-                     "date"
1975
-             ]
1976
-      }
1968
+    {
1969
+      "AttachStdin": true,
1970
+      "AttachStdout": true,
1971
+      "AttachStderr": true,
1972
+      "Cmd": ["sh"],
1973
+      "Tty": true,
1974
+      "User": "123:456"
1975
+    }
1977 1976
 
1978 1977
 **Example response**:
1979 1978
 
... ...
@@ -1992,7 +1991,9 @@ Sets up an exec instance in a running container `id`
1992 1992
 -   **AttachStderr** - Boolean value, attaches to `stderr` of the `exec` command.
1993 1993
 -   **Tty** - Boolean value to allocate a pseudo-TTY.
1994 1994
 -   **Cmd** - Command to run specified as a string or an array of strings.
1995
-
1995
+-   **User** - A string value specifying the user, and optionally, group to run
1996
+        the exec process inside the container. Format is one of: `"user"`,
1997
+        `"user:group"`, `"uid"`, or `"uid:gid"`.
1996 1998
 
1997 1999
 **Status codes**:
1998 2000
 
... ...
@@ -2118,15 +2118,14 @@ Sets up an exec instance in a running container `id`
2118 2118
     POST /containers/e90e34656806/exec HTTP/1.1
2119 2119
     Content-Type: application/json
2120 2120
 
2121
-      {
2122
-       "AttachStdin": false,
2123
-       "AttachStdout": true,
2124
-       "AttachStderr": true,
2125
-       "Tty": false,
2126
-       "Cmd": [
2127
-                     "date"
2128
-             ]
2129
-      }
2121
+    {
2122
+      "AttachStdin": true,
2123
+      "AttachStdout": true,
2124
+      "AttachStderr": true,
2125
+      "Cmd": ["sh"],
2126
+      "Tty": true,
2127
+      "User": "123:456"
2128
+    }
2130 2129
 
2131 2130
 **Example response**:
2132 2131
 
... ...
@@ -2145,7 +2144,9 @@ Sets up an exec instance in a running container `id`
2145 2145
 -   **AttachStderr** - Boolean value, attaches to `stderr` of the `exec` command.
2146 2146
 -   **Tty** - Boolean value to allocate a pseudo-TTY.
2147 2147
 -   **Cmd** - Command to run specified as a string or an array of strings.
2148
-
2148
+-   **User** - A string value specifying the user, and optionally, group to run
2149
+        the exec process inside the container. Format is one of: `"user"`,
2150
+        `"user:group"`, `"uid"`, or `"uid:gid"`.
2149 2151
 
2150 2152
 **Status codes**:
2151 2153
 
... ...
@@ -2272,15 +2272,15 @@ Sets up an exec instance in a running container `id`
2272 2272
     POST /containers/e90e34656806/exec HTTP/1.1
2273 2273
     Content-Type: application/json
2274 2274
 
2275
-      {
2276
-       "AttachStdin": false,
2277
-       "AttachStdout": true,
2278
-       "AttachStderr": true,
2279
-       "Tty": false,
2280
-       "Cmd": [
2281
-                     "date"
2282
-             ]
2283
-      }
2275
+    {
2276
+      "AttachStdin": true,
2277
+      "AttachStdout": true,
2278
+      "AttachStderr": true,
2279
+      "Cmd": ["sh"],
2280
+      "Privileged": true,
2281
+      "Tty": true,
2282
+      "User": "123:456"
2283
+    }
2284 2284
 
2285 2285
 **Example response**:
2286 2286
 
... ...
@@ -2299,7 +2299,10 @@ Sets up an exec instance in a running container `id`
2299 2299
 -   **AttachStderr** - Boolean value, attaches to `stderr` of the `exec` command.
2300 2300
 -   **Tty** - Boolean value to allocate a pseudo-TTY.
2301 2301
 -   **Cmd** - Command to run specified as a string or an array of strings.
2302
-
2302
+-   **Privileged** - Boolean value, runs the exec process with extended privileges.
2303
+-   **User** - A string value specifying the user, and optionally, group to run
2304
+        the exec process inside the container. Format is one of: `"user"`,
2305
+        `"user:group"`, `"uid"`, or `"uid:gid"`.
2303 2306
 
2304 2307
 **Status codes**:
2305 2308
 
... ...
@@ -2662,16 +2662,16 @@ Sets up an exec instance in a running container `id`
2662 2662
     POST /containers/e90e34656806/exec HTTP/1.1
2663 2663
     Content-Type: application/json
2664 2664
 
2665
-      {
2666
-       "AttachStdin": false,
2667
-       "AttachStdout": true,
2668
-       "AttachStderr": true,
2669
-       "DetachKeys": "ctrl-p,ctrl-q",
2670
-       "Tty": false,
2671
-       "Cmd": [
2672
-                     "date"
2673
-             ]
2674
-      }
2665
+    {
2666
+      "AttachStdin": true,
2667
+      "AttachStdout": true,
2668
+      "AttachStderr": true,
2669
+      "Cmd": ["sh"],
2670
+      "DetachKeys": "ctrl-p,ctrl-q",
2671
+      "Privileged": true,
2672
+      "Tty": true,
2673
+      "User": "123:456"
2674
+    }
2675 2675
 
2676 2676
 **Example response**:
2677 2677
 
... ...
@@ -2693,7 +2693,10 @@ Sets up an exec instance in a running container `id`
2693 2693
         where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
2694 2694
 -   **Tty** - Boolean value to allocate a pseudo-TTY.
2695 2695
 -   **Cmd** - Command to run specified as a string or an array of strings.
2696
-
2696
+-   **Privileged** - Boolean value, runs the exec process with extended privileges.
2697
+-   **User** - A string value specifying the user, and optionally, group to run
2698
+        the exec process inside the container. Format is one of: `"user"`,
2699
+        `"user:group"`, `"uid"`, or `"uid:gid"`.
2697 2700
 
2698 2701
 **Status codes**:
2699 2702
 
... ...
@@ -2736,16 +2736,16 @@ Sets up an exec instance in a running container `id`
2736 2736
     POST /containers/e90e34656806/exec HTTP/1.1
2737 2737
     Content-Type: application/json
2738 2738
 
2739
-      {
2740
-       "AttachStdin": false,
2741
-       "AttachStdout": true,
2742
-       "AttachStderr": true,
2743
-       "DetachKeys": "ctrl-p,ctrl-q",
2744
-       "Tty": false,
2745
-       "Cmd": [
2746
-                     "date"
2747
-             ]
2748
-      }
2739
+    {
2740
+      "AttachStdin": true,
2741
+      "AttachStdout": true,
2742
+      "AttachStderr": true,
2743
+      "Cmd": ["sh"],
2744
+      "DetachKeys": "ctrl-p,ctrl-q",
2745
+      "Privileged": true,
2746
+      "Tty": true,
2747
+      "User": "123:456"
2748
+    }
2749 2749
 
2750 2750
 **Example response**:
2751 2751
 
... ...
@@ -2767,7 +2767,10 @@ Sets up an exec instance in a running container `id`
2767 2767
         where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
2768 2768
 -   **Tty** - Boolean value to allocate a pseudo-TTY.
2769 2769
 -   **Cmd** - Command to run specified as a string or an array of strings.
2770
-
2770
+-   **Privileged** - Boolean value, runs the exec process with extended privileges.
2771
+-   **User** - A string value specifying the user, and optionally, group to run
2772
+        the exec process inside the container. Format is one of: `"user"`,
2773
+        `"user:group"`, `"uid"`, or `"uid:gid"`.
2771 2774
 
2772 2775
 **Status codes**:
2773 2776
 
... ...
@@ -2750,16 +2750,16 @@ Sets up an exec instance in a running container `id`
2750 2750
     POST /containers/e90e34656806/exec HTTP/1.1
2751 2751
     Content-Type: application/json
2752 2752
 
2753
-      {
2754
-       "AttachStdin": false,
2755
-       "AttachStdout": true,
2756
-       "AttachStderr": true,
2757
-       "DetachKeys": "ctrl-p,ctrl-q",
2758
-       "Tty": false,
2759
-       "Cmd": [
2760
-                     "date"
2761
-             ]
2762
-      }
2753
+    {
2754
+      "AttachStdin": true,
2755
+      "AttachStdout": true,
2756
+      "AttachStderr": true,
2757
+      "Cmd": ["sh"],
2758
+      "DetachKeys": "ctrl-p,ctrl-q",
2759
+      "Privileged": true,
2760
+      "Tty": true,
2761
+      "User": "123:456"
2762
+    }
2763 2763
 
2764 2764
 **Example response**:
2765 2765
 
... ...
@@ -2781,7 +2781,10 @@ Sets up an exec instance in a running container `id`
2781 2781
         where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
2782 2782
 -   **Tty** - Boolean value to allocate a pseudo-TTY.
2783 2783
 -   **Cmd** - Command to run specified as a string or an array of strings.
2784
-
2784
+-   **Privileged** - Boolean value, runs the exec process with extended privileges.
2785
+-   **User** - A string value specifying the user, and optionally, group to run
2786
+        the exec process inside the container. Format is one of: `"user"`,
2787
+        `"user:group"`, `"uid"`, or `"uid:gid"`.
2785 2788
 
2786 2789
 **Status codes**:
2787 2790
 
... ...
@@ -2785,16 +2785,16 @@ Sets up an exec instance in a running container `id`
2785 2785
     POST /containers/e90e34656806/exec HTTP/1.1
2786 2786
     Content-Type: application/json
2787 2787
 
2788
-      {
2789
-       "AttachStdin": false,
2790
-       "AttachStdout": true,
2791
-       "AttachStderr": true,
2792
-       "DetachKeys": "ctrl-p,ctrl-q",
2793
-       "Tty": false,
2794
-       "Cmd": [
2795
-                     "date"
2796
-             ]
2797
-      }
2788
+    {
2789
+      "AttachStdin": true,
2790
+      "AttachStdout": true,
2791
+      "AttachStderr": true,
2792
+      "Cmd": ["sh"],
2793
+      "DetachKeys": "ctrl-p,ctrl-q",
2794
+      "Privileged": true,
2795
+      "Tty": true,
2796
+      "User": "123:456"
2797
+    }
2798 2798
 
2799 2799
 **Example response**:
2800 2800
 
... ...
@@ -2816,7 +2816,10 @@ Sets up an exec instance in a running container `id`
2816 2816
         where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
2817 2817
 -   **Tty** - Boolean value to allocate a pseudo-TTY.
2818 2818
 -   **Cmd** - Command to run specified as a string or an array of strings.
2819
-
2819
+-   **Privileged** - Boolean value, runs the exec process with extended privileges.
2820
+-   **User** - A string value specifying the user, and optionally, group to run
2821
+        the exec process inside the container. Format is one of: `"user"`,
2822
+        `"user:group"`, `"uid"`, or `"uid:gid"`.
2820 2823
 
2821 2824
 **Status codes**:
2822 2825