Browse code

Add doc

Victor Vieux authored on 2013/06/29 01:05:41
Showing 4 changed files
... ...
@@ -29,6 +29,11 @@ You can still call an old version of the api using /v1.0/images/<name>/insert
29 29
 What's new
30 30
 ----------
31 31
 
32
+Listing processes (/proc):
33
+
34
+- List the processes inside a container
35
+
36
+
32 37
 Builder (/build):
33 38
 
34 39
 - Simplify the upload of the build context
... ...
@@ -220,6 +220,46 @@ Inspect a container
220 220
 	:statuscode 500: server error
221 221
 
222 222
 
223
+List processes running inside a container
224
+*****************************************
225
+
226
+.. http:get:: /containers/(id)/proc
227
+
228
+	List processes running inside the container ``id``
229
+
230
+	**Example request**:
231
+
232
+	.. sourcecode:: http
233
+
234
+	   GET /containers/4fa6e0f0c678/proc HTTP/1.1
235
+
236
+	**Example response**:
237
+
238
+	.. sourcecode:: http
239
+
240
+	   HTTP/1.1 200 OK
241
+	   Content-Type: application/json
242
+
243
+	   [
244
+		{
245
+		 "PID":"11935",
246
+		 "Tty":"pts/2",
247
+		 "Time":"00:00:00",
248
+		 "Cmd":"sh"
249
+		},
250
+		{
251
+		 "PID":"12140",
252
+		 "Tty":"pts/2",
253
+		 "Time":"00:00:00",
254
+		 "Cmd":"sleep"
255
+		}
256
+	   ]
257
+
258
+	:statuscode 200: no error
259
+	:statuscode 404: no such container
260
+	:statuscode 500: server error
261
+
262
+
223 263
 Inspect changes on a container's filesystem
224 264
 *******************************************
225 265
 
... ...
@@ -41,6 +41,7 @@ Available Commands
41 41
    command/login
42 42
    command/logs
43 43
    command/port
44
+   command/proc
44 45
    command/ps
45 46
    command/pull
46 47
    command/push
47 48
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+:title: Proc Command
1
+:description: Lookup the running processes of a container
2
+:keywords: proc, docker, container, documentation
3
+
4
+=======================================================
5
+``proc`` -- Lookup the running processes of a container
6
+=======================================================
7
+
8
+::
9
+
10
+    Usage: docker proc CONTAINER
11
+
12
+    Lookup the running processes of a container