1---
2swagger: "2.0"
3schemes:
4 - "http"
5 - "https"
6produces:
7 - "application/json"
8 - "text/plain"
9consumes:
10 - "application/json"
11 - "text/plain"
12basePath: "/v1.24"
13info:
14 title: "Pouch Engine API"
15 version: "1.24"
16 description: |
17 API is an HTTP API served by Pouch Engine.
18
19produces:
20 - "application/json"
21paths:
22 /_ping:
23 get:
24 summary: ""
25 description: ""
26 responses:
27 200:
28 description: "no error"
29 schema:
30 type: "string"
31 example: "OK"
32 500:
33 $ref: "#/responses/500ErrorResponse"
34
35 /version:
36 get:
37 summary: "Get Pouchd version"
38 description: ""
39 responses:
40 200:
41 schema:
42 $ref: '#/definitions/SystemVersion'
43 description: "no error"
44 500:
45 $ref: "#/responses/500ErrorResponse"
46
47 /info:
48 get:
49 summary: "Get System information"
50 description: ""
51 responses:
52 200:
53 schema:
54 $ref: '#/definitions/SystemInfo'
55 description: "no error"
56 500:
57 $ref: "#/responses/500ErrorResponse"
58
59 /auth:
60 post:
61 summary: "Check auth configuration"
62 description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password."
63 consumes:
64 - "application/json"
65 produces:
66 - "application/json"
67 responses:
68 200:
69 description: "An identity token was generated successfully."
70 schema:
71 $ref: "#/definitions/AuthResponse"
72 401:
73 description: "Login unauthorized"
74 schema:
75 $ref: "#/responses/401ErrorResponse"
76 500:
77 description: "Server error"
78 schema:
79 $ref: "#/responses/500ErrorResponse"
80 parameters:
81 - name: "authConfig"
82 in: "body"
83 description: "Authentication to check"
84 schema:
85 $ref: "#/definitions/AuthConfig"
86
87 /daemon/update:
88 post:
89 summary: "Update daemon's labels and image proxy"
90 consumes:
91 - "application/json"
92 produces:
93 - "application/json"
94 responses:
95 200:
96 description: "no error"
97 400:
98 description: "bad parameter"
99 schema:
100 $ref: '#/definitions/Error'
101 500:
102 $ref: "#/responses/500ErrorResponse"
103 parameters:
104 - name: "DaemonUpdateConfig"
105 in: body
106 description: "Config used to update daemon, only labels and image proxy are allowed."
107 schema:
108 $ref: "#/definitions/DaemonUpdateConfig"
109
110 /images/create:
111 post:
112 summary: "Create an image by pulling from a registry or importing from an existing source file"
113 consumes:
114 - "text/plain"
115 - "application/octet-stream"
116 produces:
117 - "application/json"
118 responses:
119 200:
120 description: "no error"
121 404:
122 schema:
123 $ref: '#/definitions/Error'
124 description: "image not found"
125 500:
126 $ref: "#/responses/500ErrorResponse"
127 parameters:
128 - name: "fromImage"
129 in: "query"
130 description: "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed."
131 type: "string"
132 - name: "fromSrc"
133 in: "query"
134 description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image."
135 type: "string"
136 - name: "repo"
137 in: "query"
138 description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image."
139 type: "string"
140 - name: "tag"
141 in: "query"
142 description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled."
143 type: "string"
144 - name: "inputImage"
145 in: "body"
146 description: "Image content if the value `-` has been specified in fromSrc query parameter"
147 schema:
148 type: "string"
149 required: false
150 - name: "X-Registry-Auth"
151 in: "header"
152 description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)"
153 type: "string"
154
155 /images/load:
156 post:
157 summary: "Import images"
158 description: |
159 Load a set of images by oci.v1 format tar stream
160 consumes:
161 - application/x-tar
162 responses:
163 200:
164 description: "no error"
165 500:
166 description: "server error"
167 schema:
168 $ref: "#/responses/500ErrorResponse"
169 parameters:
170 - name: "imageTarStream"
171 in: "body"
172 description: "tar stream containing images"
173 schema:
174 type: "string"
175 format: "binary"
176 - name: "name"
177 in: "query"
178 description: "set the image name for the tar stream, default unknown/unknown"
179 type: "string"
180
181 /images/{imageid}/json:
182 get:
183 summary: "Inspect a image"
184 description: "Return the information about image"
185 operationId: "ImageInspect"
186 produces:
187 - "application/json"
188 responses:
189 200:
190 description: "no error"
191 schema:
192 $ref: "#/definitions/ImageInfo"
193 examples:
194 application/json:
195 CreatedAt: "2017-12-19 15:32:09"
196 Digest: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
197 ID: "e216a057b1cb"
198 Name: "ubuntu:12.04"
199 Size: 103579269
200 Tag: "12.04"
201 404:
202 description: "no such image"
203 schema:
204 $ref: "#/definitions/Error"
205 examples:
206 application/json:
207 message: "No such image: e216a057b1cb"
208 500:
209 $ref: "#/responses/500ErrorResponse"
210 parameters:
211 - $ref: "#/parameters/imageid"
212
213 /images/json:
214 get:
215 summary: "List Images"
216 description: "Return a list of stored images."
217 operationId: "ImageList"
218 produces:
219 - "application/json"
220 responses:
221 200:
222 description: "Summary image data for the images matching the query"
223 schema:
224 type: "array"
225 items:
226 $ref: "#/definitions/ImageInfo"
227 examples:
228 application/json:
229 - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
230 ParentId: ""
231 RepoTags:
232 - "ubuntu:12.04"
233 - "ubuntu:precise"
234 RepoDigests:
235 - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787"
236 Created: 1474925151
237 Size: 103579269
238 VirtualSize: 103579269
239 SharedSize: 0
240 Labels: {}
241 Containers: 2
242 - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175"
243 ParentId: ""
244 RepoTags:
245 - "ubuntu:12.10"
246 - "ubuntu:quantal"
247 RepoDigests:
248 - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7"
249 - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3"
250 Created: 1403128455
251 Size: 172064416
252 VirtualSize: 172064416
253 SharedSize: 0
254 Labels: {}
255 Containers: 5
256 500:
257 $ref: "#/responses/500ErrorResponse"
258 parameters:
259 - name: "all"
260 in: "query"
261 description: "Show all images. Only images from a final layer (no children) are shown by default."
262 type: "boolean"
263 - name: "filters"
264 in: "query"
265 description: |
266 A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
267
268 - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
269 - `dangling=true`
270 - `label=key` or `label="key=value"` of an image label
271 - `reference`=(`<image-name>[:<tag>]`)
272 - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
273 type: "string"
274 - name: "digests"
275 in: "query"
276 description: "Show digest information as a `RepoDigests` field on each image."
277 type: "boolean"
278
279 /images/search:
280 get:
281 summary: "Search images"
282 produces:
283 - "application/json"
284 responses:
285 200:
286 description: "No error"
287 schema:
288 type: "array"
289 items:
290 $ref: "#/definitions/SearchResultItem"
291 500:
292 $ref: "#/responses/500ErrorResponse"
293
294 /images/{imageid}/tag:
295 post:
296 summary: "Tag an image"
297 description: "Add tag reference to the existing image"
298 parameters:
299 - $ref: "#/parameters/imageid"
300 - name: "repo"
301 in: "query"
302 description: "The repository to tag in. For example, `someuser/someimage`."
303 type: "string"
304 - name: "tag"
305 in: "query"
306 description: "The name of the new tag."
307 type: "string"
308 responses:
309 201:
310 description: "No error"
311 400:
312 description: "Bad parameter"
313 schema:
314 $ref: "#/definitions/Error"
315 404:
316 description: "no such image"
317 schema:
318 $ref: "#/definitions/Error"
319 500:
320 $ref: "#/responses/500ErrorResponse"
321
322 /images/{imageid}:
323 delete:
324 summary: "Remove an image"
325 description: "Remove an image by reference."
326 parameters:
327 - $ref: "#/parameters/imageid"
328 - name: "force"
329 in: "query"
330 description: "Remove the image even if it is being used"
331 type: "boolean"
332 default: false
333 responses:
334 204:
335 description: "No error"
336 404:
337 description: "no such image"
338 schema:
339 $ref: "#/definitions/Error"
340 examples:
341 application/json:
342 message: "No such image: c2ada9df5af8"
343 500:
344 $ref: "#/responses/500ErrorResponse"
345
346 /containers/create:
347 post:
348 summary: "Create a container"
349 consumes:
350 - "application/json"
351 produces:
352 - "application/json"
353 parameters:
354 - name: "name"
355 in: "query"
356 description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`."
357 type: "string"
358 pattern: "/?[a-zA-Z0-9_-]+"
359 - name: "body"
360 in: "body"
361 description: "Container to create"
362 schema:
363 $ref: "#/definitions/ContainerCreateConfig"
364 required: true
365 responses:
366 201:
367 description: "Container created successfully"
368 schema:
369 $ref: "#/definitions/ContainerCreateResp"
370 examples:
371 application/json:
372 Id: "e90e34656806"
373 Warnings: []
374 400:
375 description: "bad parameter"
376 schema:
377 $ref: "#/definitions/Error"
378 404:
379 description: "no such image"
380 schema:
381 $ref: "#/definitions/Error"
382 examples:
383 application/json:
384 message: "image: xxx:latest: not found"
385 409:
386 description: "conflict"
387 schema:
388 $ref: "#/definitions/Error"
389 500:
390 $ref: "#/responses/500ErrorResponse"
391 tags: ["Container"]
392
393 /containers/{id}/json:
394 get:
395 summary: "Inspect a container"
396 description: "Return low-level information about a container."
397 operationId: "ContainerInspect"
398 produces:
399 - "application/json"
400 responses:
401 200:
402 description: "no error"
403 schema:
404 $ref: "#/definitions/ContainerJSON"
405 404:
406 $ref: "#/responses/404ErrorResponse"
407 500:
408 $ref: "#/responses/500ErrorResponse"
409 parameters:
410 - $ref: "#/parameters/id"
411 - name: "size"
412 in: "query"
413 type: "boolean"
414 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`"
415 tags: ["Container"]
416
417 /containers/json:
418 get:
419 summary: "List containers"
420 operationId: "ContainerList"
421 produces: ["application/json"]
422 responses:
423 200:
424 description: "Summary containers that matches the query"
425 schema:
426 type: "array"
427 items:
428 $ref: "#/definitions/Container"
429 500:
430 $ref: "#/responses/500ErrorResponse"
431 parameters:
432 - name: "all"
433 in: "query"
434 description: "Return all containers. By default, only running containers are shown"
435 type: "boolean"
436 default: false
437
438 /containers/{id}/rename:
439 post:
440 summary: "Rename a container"
441 operationId: "ContainerRename"
442 parameters:
443 - $ref: "#/parameters/id"
444 - name: "name"
445 in: "query"
446 required: true
447 description: "New name for the container"
448 type: "string"
449 responses:
450 204:
451 description: "no error"
452 404:
453 $ref: "#/responses/404ErrorResponse"
454 409:
455 description: "name already in use"
456 schema:
457 $ref: "#/definitions/Error"
458 500:
459 $ref: "#/responses/500ErrorResponse"
460 tags: ["Container"]
461
462 /containers/{id}/restart:
463 post:
464 summary: "Restart a container"
465 operationId: "ContainerRestart"
466 parameters:
467 - $ref: "#/parameters/id"
468 - name: "name"
469 in: "query"
470 required: true
471 description: "New name for the container"
472 type: "string"
473 - name: "t"
474 in: "query"
475 description: "Number of seconds to wait before killing the container"
476 type: "integer"
477 responses:
478 204:
479 description: "no error"
480 404:
481 $ref: "#/responses/404ErrorResponse"
482 500:
483 $ref: "#/responses/500ErrorResponse"
484 tags: ["Container"]
485
486 /containers/{id}/start:
487 post:
488 summary: "Start a container"
489 operationId: "ContainerStart"
490 parameters:
491 - $ref: "#/parameters/id"
492 - name: "detachKeys"
493 in: "query"
494 description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
495 type: "string"
496 responses:
497 204:
498 description: "no error"
499 404:
500 $ref: "#/responses/404ErrorResponse"
501 500:
502 $ref: "#/responses/500ErrorResponse"
503 tags: ["Container"]
504
505 /containers/{id}/stop:
506 post:
507 summary: "Stop a container"
508 operationId: "ContainerStop"
509 parameters:
510 - $ref: "#/parameters/id"
511 - name: "t"
512 in: "query"
513 description: "Number of seconds to wait before killing the container"
514 type: "integer"
515 responses:
516 204:
517 description: "no error"
518 404:
519 $ref: "#/responses/404ErrorResponse"
520 500:
521 $ref: "#/responses/500ErrorResponse"
522 tags: ["Container"]
523
524 /containers/{id}/pause:
525 post:
526 summary: "Pause a container"
527 operationId: "ContainerPause"
528 parameters:
529 - $ref: "#/parameters/id"
530 responses:
531 204:
532 description: "no error"
533 404:
534 $ref: "#/responses/404ErrorResponse"
535 500:
536 $ref: "#/responses/500ErrorResponse"
537 tags: ["Container"]
538
539 /containers/{id}/unpause:
540 post:
541 summary: "Unpause a container"
542 operationId: "ContainerUnpause"
543 parameters:
544 - $ref: "#/parameters/id"
545 responses:
546 204:
547 description: "no error"
548 404:
549 $ref: "#/responses/404ErrorResponse"
550 500:
551 $ref: "#/responses/500ErrorResponse"
552 tags: ["Container"]
553
554 /containers/{id}/top:
555 post:
556 summary: "Display the running processes of a container"
557 operationId: "ContainerTop"
558 parameters:
559 - $ref: "#/parameters/id"
560 - name: "ps_args"
561 in: "query"
562 description: "top arguments"
563 type: "string"
564 responses:
565 200:
566 description: "no error"
567 schema:
568 $ref: "#/definitions/ContainerProcessList"
569 404:
570 $ref: "#/responses/404ErrorResponse"
571 500:
572 $ref: "#/responses/500ErrorResponse"
573 tags: ["Container"]
574
575 /containers/{id}/wait:
576 post:
577 summary: "Block until a container stops, then returns the exit code."
578 operationId: "ContainerWait"
579 parameters:
580 - $ref: "#/parameters/id"
581 responses:
582 200:
583 description: "The container has exited."
584 schema:
585 type: "object"
586 required: [StatusCode]
587 properties:
588 StatusCode:
589 description: "Exit code of the container"
590 type: "integer"
591 x-nullable: false
592 Error:
593 description: "The error message of waiting container"
594 type: "string"
595 404:
596 $ref: "#/responses/404ErrorResponse"
597 500:
598 $ref: "#/responses/500ErrorResponse"
599 tags: ["Container"]
600
601 /containers/{id}:
602 delete:
603 summary: "Remove one container"
604 operationId: "ContainerRemove"
605 parameters:
606 - $ref: "#/parameters/id"
607 - name: "force"
608 in: "query"
609 description: "If the container is running, force query is used to kill it and remove it forcefully."
610 type: "boolean"
611 responses:
612 204:
613 description: "no error"
614 404:
615 $ref: "#/responses/404ErrorResponse"
616 500:
617 $ref: "#/responses/500ErrorResponse"
618 tags: ["Container"]
619
620 /containers/{id}/exec:
621 post:
622 summary: "Create an exec instance"
623 description: "Run a command inside a running container."
624 operationId: "ContainerExec"
625 consumes:
626 - "application/json"
627 produces:
628 - "application/json"
629 responses:
630 201:
631 description: "no error"
632 schema:
633 $ref: "#/definitions/ExecCreateResp"
634 404:
635 $ref: "#/responses/404ErrorResponse"
636 409:
637 description: "container is paused"
638 schema:
639 $ref: "#/definitions/Error"
640 500:
641 $ref: "#/responses/500ErrorResponse"
642 parameters:
643 - $ref: "#/parameters/id"
644 - name: "body"
645 in: "body"
646 schema:
647 $ref: "#/definitions/ExecCreateConfig"
648 required: true
649 tags: ["Exec"]
650
651 /containers/{id}/logs:
652 get:
653 summary: "Get container logs"
654 description: |
655 Get `stdout` and `stderr` logs from a container.
656
657 Note: This endpoint works only for containers with the `json-file` or `journald` logging driver.
658 operationId: "ContainerLogs"
659 responses:
660 101:
661 description: "logs returned as a stream"
662 schema:
663 type: "string"
664 format: "binary"
665 200:
666 description: "logs returned as a string in response body"
667 schema:
668 type: "string"
669 400:
670 description: "bad parameter"
671 schema:
672 $ref: "#/definitions/Error"
673 404:
674 $ref: "#/responses/404ErrorResponse"
675 500:
676 $ref: "#/responses/500ErrorResponse"
677 parameters:
678 - name: "id"
679 in: "path"
680 required: true
681 description: "ID or name of the container"
682 type: "string"
683 - name: "follow"
684 in: "query"
685 description: |
686 Return the logs as a stream.
687 type: "boolean"
688 default: false
689 - name: "stdout"
690 in: "query"
691 description: "Return logs from `stdout`"
692 type: "boolean"
693 default: false
694 - name: "stderr"
695 in: "query"
696 description: "Return logs from `stderr`"
697 type: "boolean"
698 default: false
699 - name: "since"
700 in: "query"
701 description: "Only return logs since this time, as a UNIX timestamp"
702 type: "integer"
703 default: 0
704 - name: "until"
705 in: "query"
706 description: "Only return logs before this time, as a UNIX timestamp"
707 type: "integer"
708 default: 0
709 - name: "timestamps"
710 in: "query"
711 description: "Add timestamps to every log line"
712 type: "boolean"
713 default: false
714 - name: "tail"
715 in: "query"
716 description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
717 type: "string"
718 default: "all"
719 tags: ["Container"]
720
721 /containers/{id}/resize:
722 post:
723 summary: "changes the size of the tty for a container"
724 operationId: "ContainerResize"
725 parameters:
726 - $ref: "#/parameters/id"
727 - name: "height"
728 in: "query"
729 description: "height of the tty"
730 type: "string"
731 - name: "width"
732 in: "query"
733 description: "width of the tty"
734 type: "string"
735 responses:
736 200:
737 description: "no error"
738 400:
739 description: "bad parameter"
740 schema:
741 $ref: "#/definitions/Error"
742 tags: ["Container"]
743
744 /exec/{id}/start:
745 post:
746 summary: "Start an exec instance"
747 description: "Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command."
748 operationId: "ExecStart"
749 consumes:
750 - "application/json"
751 produces:
752 - "application/vnd.raw-stream"
753 responses:
754 200:
755 description: "No error"
756 404:
757 description: "No such exec instance"
758 schema:
759 $ref: "#/definitions/Error"
760 409:
761 description: "Container is stopped or paused"
762 schema:
763 $ref: "#/definitions/Error"
764 parameters:
765 - name: "execStartConfig"
766 in: "body"
767 schema:
768 $ref: "#/definitions/ExecStartConfig"
769 - name: "id"
770 in: "path"
771 description: "Exec instance ID"
772 required: true
773 type: "string"
774 tags: ["Exec"]
775
776 /exec/{id}/json:
777 get:
778 summary: "Inspect an exec instance"
779 description: "Return low-level information about an exec instance."
780 operationId: "ExecInspect"
781 produces:
782 - "application/json"
783 responses:
784 200:
785 description: "No error"
786 schema:
787 $ref: "#/definitions/ContainerExecInspect"
788 404:
789 description: "No such exec instance"
790 schema:
791 $ref: "#/responses/404ErrorResponse"
792 500:
793 description: "Server error"
794 schema:
795 $ref: "#/responses/500ErrorResponse"
796 parameters:
797 - name: "id"
798 in: "path"
799 description: "Exec instance ID"
800 required: true
801 type: "string"
802 tags: ["Exec"]
803
804 /containers/{id}/attach:
805 post:
806 summary: "Attach to a container"
807 description: |
808 Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached.
809
810 Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything.
811
812 ### Hijacking
813
814 This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket.
815
816 This is the response from the daemon for an attach request:
817
818 ```
819 HTTP/1.1 200 OK
820 Content-Type: application/vnd.raw-stream
821
822 [STREAM]
823 ```
824
825 After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.
826
827 To hint potential proxies about connection hijacking, the Pouch client can also optionally send connection upgrade headers.
828
829 For example, the client sends this request to upgrade the connection:
830
831 ```
832 POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
833 Upgrade: tcp
834 Connection: Upgrade
835 ```
836
837 The Pouch daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream:
838
839 ```
840 HTTP/1.1 101 UPGRADED
841 Content-Type: application/vnd.raw-stream
842 Connection: Upgrade
843 Upgrade: tcp
844
845 [STREAM]
846 ```
847
848 ### Stream format
849
850 When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload.
851
852 The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`).
853
854 It is encoded on the first eight bytes like this:
855
856 ```go
857 header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
858 ```
859
860 `STREAM_TYPE` can be:
861
862 - 0: `stdin` (is written on `stdout`)
863 - 1: `stdout`
864 - 2: `stderr`
865
866 `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian.
867
868 Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`.
869
870 The simplest way to implement this protocol is the following:
871
872 1. Read 8 bytes.
873 2. Choose `stdout` or `stderr` depending on the first byte.
874 3. Extract the frame size from the last four bytes.
875 4. Read the extracted size and output it on the correct output.
876 5. Goto 1.
877
878 ### Stream format when using a TTY
879
880 When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`.
881
882 operationId: "ContainerAttach"
883 produces:
884 - "application/vnd.raw-stream"
885 responses:
886 101:
887 description: "no error, hints proxy about hijacking"
888 200:
889 description: "no error, no upgrade header found"
890 400:
891 description: "bad parameter"
892 schema:
893 $ref: "#/definitions/Error"
894 404:
895 description: "no such container"
896 schema:
897 $ref: "#/definitions/Error"
898 examples:
899 application/json:
900 message: "No such container: c2ada9df5af8"
901 500:
902 description: "server error"
903 schema:
904 $ref: "#/definitions/Error"
905 parameters:
906 - name: "id"
907 in: "path"
908 required: true
909 description: "ID or name of the container"
910 type: "string"
911 - name: "detachKeys"
912 in: "query"
913 description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`."
914 type: "string"
915 - name: "logs"
916 in: "query"
917 description: |
918 Replay previous logs from the container.
919
920 This is useful for attaching to a container that has started and you want to output everything since the container started.
921
922 If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output.
923 type: "boolean"
924 default: false
925 - name: "stream"
926 in: "query"
927 description: "Stream attached streams from the time the request was made onwards"
928 type: "boolean"
929 default: false
930 - name: "stdin"
931 in: "query"
932 description: "Attach to `stdin`"
933 type: "boolean"
934 default: false
935 - name: "stdout"
936 in: "query"
937 description: "Attach to `stdout`"
938 type: "boolean"
939 default: false
940 - name: "stderr"
941 in: "query"
942 description: "Attach to `stderr`"
943 type: "boolean"
944 default: false
945 tags: ["Container"]
946 /containers/{id}/update:
947 post:
948 summary: "Update the configurations of a container"
949 operationId: "ContainerUpdate"
950 parameters:
951 - $ref: "#/parameters/id"
952 - name: "updateConfig"
953 in: "body"
954 schema:
955 $ref: "#/definitions/UpdateConfig"
956 responses:
957 200:
958 description: "no error"
959 400:
960 description: "bad parameter"
961 schema:
962 $ref: "#/definitions/Error"
963 404:
964 $ref: "#/responses/404ErrorResponse"
965 500:
966 $ref: "#/responses/500ErrorResponse"
967 tags: ["Container"]
968 /containers/{id}/upgrade:
969 post:
970 summary: "Upgrade a container with new image and args"
971 operationId: "ContainerUpgrade"
972 parameters:
973 - $ref: "#/parameters/id"
974 - name: "upgradeConfig"
975 in: "body"
976 schema:
977 $ref: "#/definitions/ContainerUpgradeConfig"
978 responses:
979 200:
980 description: "no error"
981 400:
982 description: "bad parameter"
983 schema:
984 $ref: "#/definitions/Error"
985 404:
986 $ref: "#/responses/404ErrorResponse"
987 500:
988 $ref: "#/responses/500ErrorResponse"
989 tags: ["Container"]
990
991 /volumes:
992 get:
993 summary: "List volumes"
994 operationId: "VolumeList"
995 produces: ["application/json"]
996 responses:
997 200:
998 description: "Summary volume data that matches the query"
999 schema:
1000 $ref: "#/definitions/VolumeListResp"
1001 examples:
1002 application/json:
1003 Volumes:
1004 - CreatedAt: "2017-07-19T12:00:26Z"
1005 Name: "tardis"
1006 Driver: "local"
1007 Mountpoint: "/var/lib/pouch/volumes/tardis"
1008 Labels:
1009 com.example.some-label: "some-value"
1010 com.example.some-other-label: "some-other-value"
1011 Scope: "local"
1012 Options:
1013 device: "tmpfs"
1014 o: "opt.size=100m,uid=1000"
1015 type: "tmpfs"
1016 Warnings: []
1017 500:
1018 $ref: "#/responses/500ErrorResponse"
1019 parameters:
1020 - name: "filters"
1021 in: "query"
1022 description: |
1023 JSON encoded value of the filters (a `map[string][]string`) to
1024 process on the volumes list. Available filters:
1025
1026 - `dangling=<boolean>` When set to `true` (or `1`), returns all
1027 volumes that are not in use by a container. When set to `false`
1028 (or `0`), only volumes that are in use by one or more
1029 containers are returned.
1030 - `driver=<volume-driver-name>` Matches volumes based on their driver.
1031 - `label=<key>` or `label=<key>:<value>` Matches volumes based on
1032 the presence of a `label` alone or a `label` and a value.
1033 - `name=<volume-name>` Matches all or part of a volume name.
1034 type: "string"
1035 format: "json"
1036 tags: ["Volume"]
1037
1038 /volumes/create:
1039 post:
1040 summary: "Create a volume"
1041 operationId: "VolumeCreate"
1042 consumes: ["application/json"]
1043 produces: ["application/json"]
1044 responses:
1045 201:
1046 description: "The volume was created successfully"
1047 schema:
1048 $ref: "#/definitions/VolumeInfo"
1049 500:
1050 $ref: "#/responses/500ErrorResponse"
1051 parameters:
1052 - name: "body"
1053 in: "body"
1054 required: true
1055 description: "Volume configuration"
1056 schema:
1057 $ref: "#/definitions/VolumeCreateConfig"
1058 tags: ["Volume"]
1059
1060 /volumes/{id}:
1061 get:
1062 summary: "Inspect a volume"
1063 operationId: "VolumeInspect"
1064 produces: ["application/json"]
1065 responses:
1066 200:
1067 description: "No error"
1068 schema:
1069 $ref: "#/definitions/VolumeInfo"
1070 404:
1071 $ref: "#/responses/404ErrorResponse"
1072 500:
1073 $ref: "#/responses/500ErrorResponse"
1074 parameters:
1075 - $ref: "#/parameters/id"
1076 tags: ["Volume"]
1077
1078 delete:
1079 summary: "Delete a volume"
1080 operationId: "VolumeDelete"
1081 responses:
1082 204:
1083 description: "No error"
1084 404:
1085 $ref: "#/responses/404ErrorResponse"
1086 500:
1087 $ref: "#/responses/500ErrorResponse"
1088 parameters:
1089 - $ref: "#/parameters/id"
1090 tags: ["Volume"]
1091
1092 /networks/create:
1093 post:
1094 summary: "Create a network"
1095 operationId: "NetworkCreate"
1096 consumes: ["application/json"]
1097 produces: ["application/json"]
1098 responses:
1099 201:
1100 description: "The network was created successfully"
1101 schema:
1102 $ref: "#/definitions/NetworkCreateResp"
1103 400:
1104 description: "bad parameter"
1105 schema:
1106 $ref: "#/definitions/Error"
1107 409:
1108 description: "name already in use"
1109 schema:
1110 $ref: "#/definitions/Error"
1111 500:
1112 $ref: "#/responses/500ErrorResponse"
1113 parameters:
1114 - name: "NetworkCreateConfig"
1115 in: "body"
1116 required: true
1117 description: "Network configuration"
1118 schema:
1119 $ref: "#/definitions/NetworkCreateConfig"
1120 tags: ["Network"]
1121
1122 /networks/{id}:
1123 get:
1124 summary: "Inspect a network"
1125 operationId: "NetworkInspect"
1126 produces:
1127 - "application/json"
1128 responses:
1129 200:
1130 description: "No error"
1131 schema:
1132 $ref: "#/definitions/NetworkInspectResp"
1133 404:
1134 $ref: "#/responses/404ErrorResponse"
1135 500:
1136 $ref: "#/responses/500ErrorResponse"
1137 parameters:
1138 - $ref: "#/parameters/id"
1139 tags: ["Network"]
1140
1141 delete:
1142 summary: "Remove a network"
1143 operationId: "NetworkDelete"
1144 responses:
1145 204:
1146 description: "No error"
1147 403:
1148 description: "operation not supported for pre-defined networks"
1149 schema:
1150 $ref: "#/definitions/Error"
1151 404:
1152 $ref: "#/responses/404ErrorResponse"
1153 500:
1154 $ref: "#/responses/500ErrorResponse"
1155 parameters:
1156 - $ref: "#/parameters/id"
1157 tags: ["Network"]
1158
1159 /networks:
1160 get:
1161 summary: "List networks"
1162 operationId: "NetworkList"
1163 produces: ["application/json"]
1164 responses:
1165 200:
1166 description: "Summary networks that matches the query"
1167 schema:
1168 $ref: "#/definitions/NetworkResource"
1169 500:
1170 $ref: "#/responses/500ErrorResponse"
1171 tags: ["Network"]
1172
1173 /networks/{id}/connect:
1174 post:
1175 summary: "Connect a container to a network"
1176 operationId: "NetworkConnect"
1177 consumes:
1178 - "application/json"
1179 responses:
1180 200:
1181 description: "No error"
1182 400:
1183 description: "bad parameter"
1184 schema:
1185 $ref: "#/definitions/Error"
1186 404:
1187 description: "Network or container not found"
1188 schema:
1189 $ref: "#/responses/404ErrorResponse"
1190 500:
1191 description: "Server error"
1192 schema:
1193 $ref: "#/responses/500ErrorResponse"
1194 parameters:
1195 - name: "id"
1196 in: "path"
1197 description: "Network ID or name"
1198 required: true
1199 type: "string"
1200 - name: "container"
1201 in: "body"
1202 required: true
1203 schema:
1204 $ref: "#/definitions/NetworkConnect"
1205 tags: ["Network"]
1206
1207 /networks/{id}/disconnect:
1208 post:
1209 summary: "Disconnect a container from a network"
1210 operationId: "NetworkDisconnect"
1211 consumes:
1212 - "application/json"
1213 responses:
1214 200:
1215 description: "No error"
1216 400:
1217 description: "bad parameter"
1218 schema:
1219 $ref: "#/definitions/Error"
1220 404:
1221 description: "Network or container not found"
1222 schema:
1223 $ref: "#/responses/404ErrorResponse"
1224 500:
1225 description: "Server error"
1226 schema:
1227 $ref: "#/responses/500ErrorResponse"
1228 parameters:
1229 - name: "id"
1230 in: "path"
1231 description: "Network ID or name"
1232 required: true
1233 type: "string"
1234 - name: "NetworkDisconnect"
1235 in: "body"
1236 required: true
1237 description: "Network disconnect parameters"
1238 schema:
1239 $ref: "#/definitions/NetworkDisconnect"
1240 tags: ["Network"]
1241
1242definitions:
1243 Error:
1244 type: "object"
1245 properties:
1246 message:
1247 type: string
1248
1249 SystemVersion:
1250 type: "object"
1251 properties:
1252 Version:
1253 type: "string"
1254 description: "version of Pouch Daemon"
1255 example: "0.1.2"
1256 ApiVersion:
1257 type: "string"
1258 description: "Api Version held by daemon"
1259 example: ""
1260 GitCommit:
1261 type: "string"
1262 description: "Commit ID held by the latest commit operation"
1263 example: ""
1264 GoVersion:
1265 type: "string"
1266 description: "version of Go runtime"
1267 example: "1.8.3"
1268 Os:
1269 type: "string"
1270 description: "Operating system type of underlying system"
1271 example: "linux"
1272 Arch:
1273 type: "string"
1274 description: "Arch type of underlying hardware"
1275 example: "amd64"
1276 KernelVersion:
1277 type: "string"
1278 description: "Operating system kernel version"
1279 example: "3.13.0-106-generic"
1280 BuildTime:
1281 type: "string"
1282 description: "The time when this binary of daemon is built"
1283 example: "2017-08-29T17:41:57.729792388+00:00"
1284
1285 SystemInfo:
1286 type: "object"
1287 properties:
1288 ID:
1289 description: |
1290 Unique identifier of the daemon.
1291
1292 <p><br /></p>
1293
1294 > **Note**: The format of the ID itself is not part of the API, and
1295 > should not be considered stable.
1296 type: "string"
1297 example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS"
1298 Containers:
1299 description: "Total number of containers on the host."
1300 type: "integer"
1301 example: 14
1302 ContainersRunning:
1303 description: |
1304 Number of containers with status `"running"`.
1305 type: "integer"
1306 example: 3
1307 ContainersPaused:
1308 description: |
1309 Number of containers with status `"paused"`.
1310 type: "integer"
1311 example: 1
1312 ContainersStopped:
1313 description: |
1314 Number of containers with status `"stopped"`.
1315 type: "integer"
1316 example: 10
1317 Images:
1318 description: |
1319 Total number of images on the host.
1320
1321 Both _tagged_ and _untagged_ (dangling) images are counted.
1322 type: "integer"
1323 example: 508
1324 Driver:
1325 description: "Name of the storage driver in use."
1326 type: "string"
1327 example: "overlay2"
1328 DriverStatus:
1329 description: |
1330 Information specific to the storage driver, provided as
1331 "label" / "value" pairs.
1332
1333 This information is provided by the storage driver, and formatted
1334 in a way consistent with the output of `pouch info` on the command
1335 line.
1336
1337 <p><br /></p>
1338
1339 > **Note**: The information returned in this field, including the
1340 > formatting of values and labels, should not be considered stable,
1341 > and may change without notice.
1342 type: "array"
1343 items:
1344 type: "array"
1345 items:
1346 type: "string"
1347 example:
1348 - ["Backing Filesystem", "extfs"]
1349 - ["Supports d_type", "true"]
1350 - ["Native Overlay Diff", "true"]
1351 PouchRootDir:
1352 description: |
1353 Root directory of persistent Pouch state.
1354
1355 Defaults to `/var/lib/pouch` on Linux.
1356 type: "string"
1357 example: "/var/lib/pouch"
1358 Debug:
1359 description: "Indicates if the daemon is running in debug-mode / with debug-level logging enabled."
1360 type: "boolean"
1361 example: true
1362 LoggingDriver:
1363 description: |
1364 The logging driver to use as a default for new containers.
1365 type: "string"
1366 VolumeDrivers:
1367 description: |
1368 The list of volume drivers which the pouchd supports
1369 type: "array"
1370 items:
1371 type: "string"
1372 example: ["local", "tmpfs"]
1373 CgroupDriver:
1374 description: |
1375 The driver to use for managing cgroups.
1376 type: "string"
1377 x-nullable: false
1378 enum: ["cgroupfs", "systemd"]
1379 default: "cgroupfs"
1380 example: "cgroupfs"
1381 KernelVersion:
1382 description: |
1383 Kernel version of the host.
1384 On Linux, this information obtained from `uname`.
1385 type: "string"
1386 OperatingSystem:
1387 description: |
1388 Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS".
1389 type: "string"
1390 example: "Alpine Linux v3.5"
1391 OSType:
1392 description: |
1393 Generic type of the operating system of the host, as returned by the
1394 Go runtime (`GOOS`).
1395
1396 Currently returned value is "linux". A full list of
1397 possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
1398 type: "string"
1399 example: "linux"
1400 Architecture:
1401 description: |
1402 Hardware architecture of the host, as returned by the Go runtime
1403 (`GOARCH`).
1404
1405 A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
1406 type: "string"
1407 example: "x86_64"
1408 NCPU:
1409 description: |
1410 The number of logical CPUs usable by the daemon.
1411
1412 The number of available CPUs is checked by querying the operating
1413 system when the daemon starts. Changes to operating system CPU
1414 allocation after the daemon is started are not reflected.
1415 type: "integer"
1416 example: 4
1417 MemTotal:
1418 description: |
1419 Total amount of physical memory available on the host, in kilobytes (kB).
1420 type: "integer"
1421 format: "int64"
1422 example: 2095882240
1423
1424 IndexServerAddress:
1425 description: |
1426 Address / URL of the index server that is used for image search,
1427 and as a default for user authentication.
1428 type: "string"
1429 DefaultRegistry:
1430 description: |
1431 default registry can be defined by user.
1432 type: "string"
1433 RegistryConfig:
1434 $ref: "#/definitions/RegistryServiceConfig"
1435 HttpProxy:
1436 description: |
1437 HTTP-proxy configured for the daemon. This value is obtained from the
1438 [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
1439
1440 Containers do not automatically inherit this configuration.
1441 type: "string"
1442 example: "http://user:pass@proxy.corp.example.com:8080"
1443 HttpsProxy:
1444 description: |
1445 HTTPS-proxy configured for the daemon. This value is obtained from the
1446 [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
1447
1448 Containers do not automatically inherit this configuration.
1449 type: "string"
1450 example: "https://user:pass@proxy.corp.example.com:4443"
1451 Name:
1452 description: "Hostname of the host."
1453 type: "string"
1454 example: "node5.corp.example.com"
1455 Labels:
1456 description: |
1457 User-defined labels (key/value metadata) as set on the daemon.
1458 type: "array"
1459 items:
1460 type: "string"
1461 example: ["storage=ssd", "production"]
1462 ExperimentalBuild:
1463 description: |
1464 Indicates if experimental features are enabled on the daemon.
1465 type: "boolean"
1466 example: true
1467 ServerVersion:
1468 description: |
1469 Version string of the daemon.
1470 type: "string"
1471 example: "17.06.0-ce"
1472 Runtimes:
1473 description: |
1474 List of [OCI compliant](https://github.com/opencontainers/runtime-spec)
1475 runtimes configured on the daemon. Keys hold the "name" used to
1476 reference the runtime.
1477
1478 The Pouch daemon relies on an OCI compliant runtime (invoked via the
1479 `containerd` daemon) as its interface to the Linux kernel namespaces,
1480 cgroups, and SELinux.
1481
1482 The default runtime is `runc`, and automatically configured. Additional
1483 runtimes can be configured by the user and will be listed here.
1484 type: "object"
1485 additionalProperties:
1486 $ref: "#/definitions/Runtime"
1487 default:
1488 runc:
1489 path: "pouch-runc"
1490 example:
1491 runc:
1492 path: "pouch-runc"
1493 runc-master:
1494 path: "/go/bin/runc"
1495 custom:
1496 path: "/usr/local/bin/my-oci-runtime"
1497 runtimeArgs: ["--debug", "--systemd-cgroup=false"]
1498 DefaultRuntime:
1499 description: |
1500 Name of the default OCI runtime that is used when starting containers.
1501 The default can be overridden per-container at create time.
1502 type: "string"
1503 x-nullable: false
1504 default: "runc"
1505 example: "runc"
1506 LiveRestoreEnabled:
1507 description: |
1508 Indicates if live restore is enabled.
1509 If enabled, containers are kept running when the daemon is shutdown
1510 or upon daemon start if running containers are detected.
1511 type: "boolean"
1512 x-nullable: false
1513 default: false
1514 example: false
1515 LxcfsEnabled:
1516 description: |
1517 Indicates if lxcfs is enabled.
1518 type: "boolean"
1519 x-nullable: false
1520 default: false
1521 example: false
1522 ContainerdCommit:
1523 $ref: "#/definitions/Commit"
1524 RuncCommit:
1525 $ref: "#/definitions/Commit"
1526 SecurityOptions:
1527 description: |
1528 List of security features that are enabled on the daemon, such as
1529 apparmor, seccomp, SELinux, and user-namespaces (userns).
1530
1531 Additional configuration options for each security feature may
1532 be present, and are included as a comma-separated list of key/value
1533 pairs.
1534 type: "array"
1535 items:
1536 type: "string"
1537 example:
1538 - "name=apparmor"
1539 - "name=seccomp,profile=default"
1540 - "name=selinux"
1541 - "name=userns"
1542 ListenAddresses:
1543 description: "List of addresses the pouchd listens on"
1544 type: "array"
1545 items:
1546 type: "string"
1547 example:
1548 - ["unix:///var/run/pouchd.sock", "tcp://0.0.0.0:4243"]
1549
1550 DaemonUpdateConfig:
1551 type: "object"
1552 properties:
1553 Labels:
1554 description: "Labels indentified the attributes of daemon"
1555 type: "array"
1556 items:
1557 type: "string"
1558 example: ["storage=ssd", "zone=hangzhou"]
1559 ImageProxy:
1560 description: "Image proxy used to pull image."
1561 type: "string"
1562
1563 RegistryServiceConfig:
1564 description: |
1565 RegistryServiceConfig stores daemon registry services configuration.
1566 type: "object"
1567 x-nullable: true
1568 properties:
1569 AllowNondistributableArtifactsCIDRs:
1570 description: |
1571 List of IP ranges to which nondistributable artifacts can be pushed,
1572 using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632).
1573
1574 Some images contain artifacts whose distribution is restricted by license.
1575 When these images are pushed to a registry, restricted artifacts are not
1576 included.
1577
1578 This configuration override this behavior, and enables the daemon to
1579 push nondistributable artifacts to all registries whose resolved IP
1580 address is within the subnet described by the CIDR syntax.
1581
1582 This option is useful when pushing images containing
1583 nondistributable artifacts to a registry on an air-gapped network so
1584 hosts on that network can pull the images without connecting to
1585 another server.
1586
1587 > **Warning**: Nondistributable artifacts typically have restrictions
1588 > on how and where they can be distributed and shared. Only use this
1589 > feature to push artifacts to private registries and ensure that you
1590 > are in compliance with any terms that cover redistributing
1591 > nondistributable artifacts.
1592
1593 x-omitempty: true
1594 type: "array"
1595 items:
1596 type: "string"
1597 example: ["::1/128", "127.0.0.0/8"]
1598 AllowNondistributableArtifactsHostnames:
1599 description: |
1600 List of registry hostnames to which nondistributable artifacts can be
1601 pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`.
1602
1603 Some images (for example, Windows base images) contain artifacts
1604 whose distribution is restricted by license. When these images are
1605 pushed to a registry, restricted artifacts are not included.
1606
1607 This configuration override this behavior for the specified
1608 registries.
1609
1610 This option is useful when pushing images containing
1611 nondistributable artifacts to a registry on an air-gapped network so
1612 hosts on that network can pull the images without connecting to
1613 another server.
1614
1615 > **Warning**: Nondistributable artifacts typically have restrictions
1616 > on how and where they can be distributed and shared. Only use this
1617 > feature to push artifacts to private registries and ensure that you
1618 > are in compliance with any terms that cover redistributing
1619 > nondistributable artifacts.
1620 x-omitempty: true
1621 type: "array"
1622 items:
1623 type: "string"
1624 example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"]
1625 InsecureRegistryCIDRs:
1626 description: |
1627 List of IP ranges of insecure registries, using the CIDR syntax
1628 ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries
1629 accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates
1630 from unknown CAs) communication.
1631
1632 By default, local registries (`127.0.0.0/8`) are configured as
1633 insecure. All other registries are secure. Communicating with an
1634 insecure registry is not possible if the daemon assumes that registry
1635 is secure.
1636
1637 This configuration override this behavior, insecure communication with
1638 registries whose resolved IP address is within the subnet described by
1639 the CIDR syntax.
1640
1641 Registries can also be marked insecure by hostname. Those registries
1642 are listed under `IndexConfigs` and have their `Secure` field set to
1643 `false`.
1644
1645 > **Warning**: Using this option can be useful when running a local
1646 > registry, but introduces security vulnerabilities. This option
1647 > should therefore ONLY be used for testing purposes. For increased
1648 > security, users should add their CA to their system's list of trusted
1649 > CAs instead of enabling this option.
1650 x-omitempty: true
1651 type: "array"
1652 items:
1653 type: "string"
1654 example: ["::1/128", "127.0.0.0/8"]
1655 IndexConfigs:
1656 x-omitempty: true
1657 type: "object"
1658 additionalProperties:
1659 $ref: "#/definitions/IndexInfo"
1660 example:
1661 "127.0.0.1:5000":
1662 "Name": "127.0.0.1:5000"
1663 "Mirrors": []
1664 "Secure": false
1665 "Official": false
1666 "[2001:db8:a0b:12f0::1]:80":
1667 "Name": "[2001:db8:a0b:12f0::1]:80"
1668 "Mirrors": []
1669 "Secure": false
1670 "Official": false
1671 "registry.internal.corp.example.com:3000":
1672 Name: "registry.internal.corp.example.com:3000"
1673 Mirrors: []
1674 Secure: false
1675 Official: false
1676 Mirrors:
1677 description: "List of registry URLs that act as a mirror for the official registry."
1678 x-omitempty: true
1679 type: "array"
1680 items:
1681 type: "string"
1682 example:
1683 - "https://hub-mirror.corp.example.com:5000/"
1684 - "https://[2001:db8:a0b:12f0::1]/"
1685
1686 IndexInfo:
1687 description:
1688 IndexInfo contains information about a registry.
1689 type: "object"
1690 x-nullable: true
1691 properties:
1692 Name:
1693 description: |
1694 Name of the registry.
1695 type: "string"
1696 Mirrors:
1697 description: |
1698 List of mirrors, expressed as URIs.
1699 type: "array"
1700 items:
1701 type: "string"
1702 example:
1703 - "https://hub-mirror.corp.example.com:5000/"
1704 Secure:
1705 description: |
1706 Indicates if the the registry is part of the list of insecure
1707 registries.
1708
1709 If `false`, the registry is insecure. Insecure registries accept
1710 un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
1711 unknown CAs) communication.
1712
1713 > **Warning**: Insecure registries can be useful when running a local
1714 > registry. However, because its use creates security vulnerabilities
1715 > it should ONLY be enabled for testing purposes. For increased
1716 > security, users should add their CA to their system's list of
1717 > trusted CAs instead of enabling this option.
1718 type: "boolean"
1719 example: true
1720 Official:
1721 description: |
1722 Indicates whether this is an official registry.
1723 type: "boolean"
1724 example: true
1725
1726 Runtime:
1727 description: |
1728 Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec)
1729 runtime.
1730
1731 The runtime is invoked by the daemon via the `containerd` daemon. OCI
1732 runtimes act as an interface to the Linux kernel namespaces, cgroups,
1733 and SELinux.
1734 type: "object"
1735 properties:
1736 path:
1737 description: |
1738 Name and, optional, path, of the OCI executable binary.
1739
1740 If the path is omitted, the daemon searches the host's `$PATH` for the
1741 binary and uses the first result.
1742 type: "string"
1743 example: "/usr/local/bin/my-oci-runtime"
1744 runtimeArgs:
1745 description: |
1746 List of command-line arguments to pass to the runtime when invoked.
1747 type: "array"
1748 x-nullable: true
1749 items:
1750 type: "string"
1751 example: ["--debug", "--systemd-cgroup=false"]
1752
1753 Commit:
1754 description: |
1755 Commit holds the Git-commit (SHA1) that a binary was built from, as
1756 reported in the version-string of external tools, such as `containerd`,
1757 or `runC`.
1758 type: "object"
1759 properties:
1760 ID:
1761 description: "Actual commit ID of external tool."
1762 type: "string"
1763 example: "cfb82a876ecc11b5ca0977d1733adbe58599088a"
1764 Expected:
1765 description: |
1766 Commit ID of external tool expected by pouchd as set at build time.
1767 type: "string"
1768 example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4"
1769
1770 AuthConfig:
1771 type: "object"
1772 properties:
1773 Username:
1774 type: "string"
1775 Password:
1776 type: "string"
1777 Auth:
1778 type: "string"
1779 ServerAddress:
1780 type: "string"
1781 IdentityToken:
1782 type: "string"
1783 description: "IdentityToken is used to authenticate the user and get an access token for the registry"
1784 RegistryToken:
1785 type: "string"
1786 description: "RegistryToken is a bearer token to be sent to a registry"
1787
1788 AuthResponse:
1789 description: "The response returned by login to a registry"
1790 type: "object"
1791 required: [Status]
1792 properties:
1793 Status:
1794 description: "The status of the authentication"
1795 type: "string"
1796 x-nullable: false
1797 IdentityToken:
1798 description: "An opaque token used to authenticate a user after a successful login"
1799 type: "string"
1800 x-nullable: false
1801
1802 ContainerCreateConfig:
1803 description: |
1804 ContainerCreateConfig is used for API "POST /containers/create".
1805 It wraps all kinds of config used in container creation.
1806 It can be used to encode client params in client and unmarshal request body in daemon side.
1807 allOf:
1808 - $ref: "#/definitions/ContainerConfig"
1809 - type: "object"
1810 properties:
1811 HostConfig:
1812 $ref: "#/definitions/HostConfig"
1813 NetworkingConfig:
1814 $ref: "#/definitions/NetworkingConfig"
1815
1816 ContainerConfig:
1817 type: "object"
1818 description: "Configuration for a container that is portable between hosts"
1819 required:
1820 - Image
1821 properties:
1822 Hostname:
1823 description: "The hostname to use for the container, as a valid RFC 1123 hostname."
1824 type: "string"
1825 format: hostname
1826 minLength: 1
1827 Domainname:
1828 description: "The domain name to use for the container."
1829 type: "string"
1830 User:
1831 description: "The user that commands are run as inside the container."
1832 type: "string"
1833 AttachStdin:
1834 description: "Whether to attach to `stdin`."
1835 type: "boolean"
1836 x-nullable: false
1837 AttachStdout:
1838 description: "Whether to attach to `stdout`."
1839 type: "boolean"
1840 x-nullable: false
1841 default: true
1842 AttachStderr:
1843 description: "Whether to attach to `stderr`."
1844 type: "boolean"
1845 x-nullable: false
1846 default: true
1847 DisableNetworkFiles:
1848 description: "Whether to generate the network files(/etc/hostname, /etc/hosts and /etc/resolv.conf) for container."
1849 type: "boolean"
1850 x-nullable: false
1851 default: false
1852 ExposedPorts:
1853 description: "An object mapping ports to an empty object in the form:`{<port>/<tcp|udp>: {}}`"
1854 type: "object"
1855 additionalProperties:
1856 type: "object"
1857 enum:
1858 - {}
1859 default: {}
1860 Tty:
1861 description: "Attach standard streams to a TTY, including `stdin` if it is not closed."
1862 type: "boolean"
1863 x-nullable: false
1864 OpenStdin:
1865 description: "Open `stdin`"
1866 type: "boolean"
1867 x-nullable: false
1868 StdinOnce:
1869 description: "Close `stdin` after one attached client disconnects"
1870 type: "boolean"
1871 x-nullable: false
1872 Env:
1873 description: |
1874 A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.
1875 type: "array"
1876 items:
1877 type: "string"
1878 Cmd:
1879 description: "Command to run specified an array of strings."
1880 type: "array"
1881 items:
1882 type: "string"
1883 ArgsEscaped:
1884 description: "Command is already escaped (Windows only)"
1885 type: "boolean"
1886 x-nullable: false
1887 Image:
1888 description: "The name of the image to use when creating the container"
1889 type: "string"
1890 x-nullable: false
1891 Volumes:
1892 description: "An object mapping mount point paths inside the container to empty objects."
1893 type: "object"
1894 additionalProperties:
1895 type: "object"
1896 enum:
1897 - {}
1898 default: {}
1899 WorkingDir:
1900 description: "The working directory for commands to run in."
1901 type: "string"
1902 Entrypoint:
1903 description: |
1904 The entry point for the container as a string or an array of strings.
1905 If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default.
1906 type: "array"
1907 items:
1908 type: "string"
1909 NetworkDisabled:
1910 description: "Disable networking for the container."
1911 type: "boolean"
1912 MacAddress:
1913 description: "MAC address of the container."
1914 type: "string"
1915 OnBuild:
1916 description: "`ONBUILD` metadata that were defined."
1917 type: "array"
1918 items:
1919 type: "string"
1920 Labels:
1921 description: "User-defined key/value metadata."
1922 type: "object"
1923 additionalProperties:
1924 type: "string"
1925 StopSignal:
1926 description: "Signal to stop a container as a string or unsigned integer."
1927 type: "string"
1928 default: "SIGTERM"
1929 x-nullable: false
1930 StopTimeout:
1931 description: "Timeout to stop a container in seconds."
1932 type: "integer"
1933 default: 10
1934 Shell:
1935 description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell."
1936 type: "array"
1937 items:
1938 type: "string"
1939 Rich:
1940 type: "boolean"
1941 description: "Whether to start container in rich container mode. (default false)"
1942 x-nullable: false
1943 RichMode:
1944 type: "string"
1945 description: "Choose one rich container mode.(default dumb-init)"
1946 enum:
1947 - "dumb-init"
1948 - "sbin-init"
1949 - "systemd"
1950 InitScript:
1951 type: "string"
1952 description: "Initial script executed in container. The script will be executed before entrypoint or command"
1953 DiskQuota:
1954 type: "object"
1955 description: "Set disk quota for container"
1956 x-nullable: true
1957 additionalProperties:
1958 type: "string"
1959 SpecAnnotation:
1960 description: "annotations send to runtime spec."
1961 type: "object"
1962 additionalProperties:
1963 type: "string"
1964 QuotaID:
1965 type: "string"
1966 description: "set disk quota by specified quota id, if id < 0, it means pouchd alloc a unique quota id"
1967
1968 ContainerCreateResp:
1969 description: "response returned by daemon when container create successfully"
1970 type: "object"
1971 required: [Id, Warnings]
1972 properties:
1973 Id:
1974 description: "The ID of the created container"
1975 type: "string"
1976 x-nullable: false
1977 Name:
1978 description: "The name of the created container"
1979 type: "string"
1980 Warnings:
1981 description: "Warnings encountered when creating the container"
1982 type: "array"
1983 x-nullable: false
1984 items:
1985 type: "string"
1986
1987 HostConfig:
1988 description: "Container configuration that depends on the host we are running on"
1989 type: "object"
1990 allOf:
1991 - properties:
1992 # Applicable to all platforms
1993 Binds:
1994 type: "array"
1995 description: |
1996 A list of volume bindings for this container. Each volume binding is a string in one of these forms:
1997
1998 - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
1999 - `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
2000 - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path.
2001 - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path.
2002 items:
2003 type: "string"
2004 ContainerIDFile:
2005 type: "string"
2006 description: "Path to a file where the container ID is written"
2007 LogConfig:
2008 description: "The logging configuration for this container"
2009 type: "object"
2010 $ref: "#/definitions/LogConfig"
2011 RestartPolicy:
2012 type: "object"
2013 description: "Restart policy to be used to manage the container"
2014 $ref: "#/definitions/RestartPolicy"
2015 NetworkMode:
2016 type: "string"
2017 description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom network's name to which this container should connect to."
2018 PortBindings:
2019 type: "object"
2020 description: "A map of exposed container ports and the host port they should map to."
2021 $ref: "#/definitions/PortMap"
2022 AutoRemove:
2023 type: "boolean"
2024 description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set."
2025 VolumeDriver:
2026 type: "string"
2027 description: "Driver that this container uses to mount volumes."
2028 VolumesFrom:
2029 type: "array"
2030 description: "A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`."
2031 items:
2032 type: "string"
2033 CapAdd:
2034 type: "array"
2035 description: "A list of kernel capabilities to add to the container."
2036 items:
2037 type: "string"
2038 CapDrop:
2039 type: "array"
2040 description: "A list of kernel capabilities to drop from the container."
2041 items:
2042 type: "string"
2043 Dns:
2044 type: "array"
2045 description: "A list of DNS servers for the container to use."
2046 items:
2047 type: "string"
2048 DnsOptions:
2049 type: "array"
2050 description: "A list of DNS options."
2051 items:
2052 type: "string"
2053 DnsSearch:
2054 type: "array"
2055 description: "A list of DNS search domains."
2056 items:
2057 type: "string"
2058 ExtraHosts:
2059 type: "array"
2060 description: |
2061 A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`.
2062 items:
2063 type: "string"
2064 GroupAdd:
2065 type: "array"
2066 description: "A list of additional groups that the container process will run as."
2067 items:
2068 type: "string"
2069 IpcMode:
2070 type: "string"
2071 description: |
2072 IPC sharing mode for the container. Possible values are:
2073 - `"none"`: own private IPC namespace, with /dev/shm not mounted
2074 - `"private"`: own private IPC namespace
2075 - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers
2076 - `"container:<name|id>"`: join another (shareable) container's IPC namespace
2077 - `"host"`: use the host system's IPC namespace
2078 If not specified, daemon default is used, which can either be `"private"`
2079 or `"shareable"`, depending on daemon version and configuration.
2080 Cgroup:
2081 type: "string"
2082 description: "Cgroup to use for the container."
2083 Links:
2084 type: "array"
2085 description: "A list of links for the container in the form `container_name:alias`."
2086 items:
2087 type: "string"
2088 OomScoreAdj:
2089 type: "integer"
2090 description: |
2091 An integer value containing the score given to the container in order to tune OOM killer preferences.
2092 The range is in [-1000, 1000].
2093 type: "integer"
2094 format: "int"
2095 x-nullable: false
2096 minimum: -1000
2097 maximum: 1000
2098 PidMode:
2099 type: "string"
2100 description: |
2101 Set the PID (Process) Namespace mode for the container. It can be either:
2102 - `"container:<name|id>"`: joins another container's PID namespace
2103 - `"host"`: use the host's PID namespace inside the container
2104 Privileged:
2105 type: "boolean"
2106 description: "Gives the container full access to the host."
2107 PublishAllPorts:
2108 type: "boolean"
2109 description: "Allocates a random host port for all of a container's exposed ports."
2110 ReadonlyRootfs:
2111 type: "boolean"
2112 description: "Mount the container's root filesystem as read only."
2113 SecurityOpt:
2114 type: "array"
2115 description: "A list of string values to customize labels for MLS systems, such as SELinux."
2116 items:
2117 type: "string"
2118 StorageOpt:
2119 type: "object"
2120 description: |
2121 Storage driver options for this container, in the form `{"size": "120G"}`.
2122 additionalProperties:
2123 type: "string"
2124 Tmpfs:
2125 type: "object"
2126 description: |
2127 A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`.
2128 additionalProperties:
2129 type: "string"
2130 UTSMode:
2131 type: "string"
2132 description: "UTS namespace to use for the container."
2133 UsernsMode:
2134 type: "string"
2135 description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled."
2136 ShmSize:
2137 type: "integer"
2138 description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB."
2139 minimum: 0
2140 Sysctls:
2141 type: "object"
2142 description: |
2143 A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}`
2144 additionalProperties:
2145 type: "string"
2146 Runtime:
2147 type: "string"
2148 description: "Runtime to use with this container."
2149 # Applicable to Windows
2150 ConsoleSize:
2151 type: "array"
2152 description: "Initial console size, as an `[height, width]` array. (Windows only)"
2153 minItems: 2
2154 maxItems: 2
2155 items:
2156 type: "integer"
2157 minimum: 0
2158 Isolation:
2159 type: "string"
2160 description: "Isolation technology of the container. (Windows only)"
2161 enum:
2162 - "default"
2163 - "process"
2164 - "hyperv"
2165 EnableLxcfs:
2166 description: "Whether to enable lxcfs."
2167 type: "boolean"
2168 x-nullable: false
2169 Rich:
2170 type: "boolean"
2171 description: "Whether to start container in rich container mode. (default false)"
2172 x-nullable: false
2173 RichMode:
2174 type: "string"
2175 description: "Choose one rich container mode.(default dumb-init)"
2176 enum:
2177 - "dumb-init"
2178 - "sbin-init"
2179 - "systemd"
2180 InitScript:
2181 type: "string"
2182 description: "Initial script executed in container. The script will be executed before entrypoint or command"
2183 - $ref: "#/definitions/Resources"
2184
2185 UpdateConfig:
2186 description: "UpdateConfig holds the mutable attributes of a Container. Those attributes can be updated at runtime."
2187 allOf:
2188 - $ref: "#/definitions/Resources"
2189 - properties:
2190 RestartPolicy:
2191 $ref: "#/definitions/RestartPolicy"
2192 Env:
2193 description: |
2194 A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.
2195 type: "array"
2196 items:
2197 type: "string"
2198 Label:
2199 description: "List of labels set to container."
2200 type: "array"
2201 items:
2202 type: "string"
2203 DiskQuota:
2204 type: "object"
2205 description: "update disk quota for container"
2206 x-nullable: true
2207 additionalProperties:
2208 type: "string"
2209
2210 ContainerUpgradeConfig:
2211 description: |
2212 ContainerUpgradeConfig is used for API "POST /containers/upgrade".
2213 It wraps all kinds of config used in container upgrade.
2214 It can be used to encode client params in client and unmarshal request body in daemon side.
2215 allOf:
2216 - $ref: "#/definitions/ContainerConfig"
2217 - type: "object"
2218 properties:
2219 HostConfig:
2220 $ref: "#/definitions/HostConfig"
2221
2222 LogConfig:
2223 description: "The logging configuration for this container"
2224 type: "object"
2225 properties:
2226 Type:
2227 type: "string"
2228 x-go-name: "LogDriver"
2229 enum:
2230 - "json-file"
2231 - "syslog"
2232 - "journald"
2233 - "gelf"
2234 - "fluentd"
2235 - "awslogs"
2236 - "splunk"
2237 - "etwlogs"
2238 - "none"
2239 Config:
2240 type: "object"
2241 x-go-name: "LogOpts"
2242 additionalProperties:
2243 type: "string"
2244
2245 Resources:
2246 description: "A container's resources (cgroups config, ulimits, etc)"
2247 type: "object"
2248 required: [CPUShares, Memory, CgroupParent, BlkioWeight, CPUPeriod, CPUQuota, CpuRealtimePeriod,
2249 CpuRealtimeRuntime, CpusetCpus, CpusetMems, DeviceCgroupRules, KernelMemory, MemoryReservation,
2250 MemorySwap, MemorySwappiness, NanoCPUs, OomKillDisable, PidsLimit, CpuCount, CpuPercent,
2251 IOMaximumIOps, IOMaximumBandwidth, IntelRdtL3Cbm, ScheLatSwitch, MemoryWmarkRatio, MemoryExtra,
2252 MemoryForceEmptyCtl]
2253 properties:
2254 # Applicable to UNIX platforms
2255 CgroupParent:
2256 description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist."
2257 type: "string"
2258 x-nullable: false
2259 BlkioWeight:
2260 description: "Block IO weight (relative weight), need CFQ IO Scheduler enable."
2261 type: "integer"
2262 format: "uint16"
2263 x-nullable: false
2264 minimum: 0
2265 maximum: 1000
2266 BlkioWeightDevice:
2267 description: |
2268 Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`.
2269 type: "array"
2270 items:
2271 $ref: "#/definitions/WeightDevice"
2272 BlkioDeviceReadBps:
2273 description: |
2274 Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
2275 type: "array"
2276 items:
2277 $ref: "#/definitions/ThrottleDevice"
2278 BlkioDeviceWriteBps:
2279 description: |
2280 Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
2281 type: "array"
2282 items:
2283 $ref: "#/definitions/ThrottleDevice"
2284 BlkioDeviceReadIOps:
2285 description: |
2286 Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
2287 type: "array"
2288 items:
2289 $ref: "#/definitions/ThrottleDevice"
2290 BlkioDeviceWriteIOps:
2291 description: |
2292 Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
2293 type: "array"
2294 items:
2295 $ref: "#/definitions/ThrottleDevice"
2296 CPUShares:
2297 description: "An integer value representing this container's relative CPU weight versus other containers."
2298 type: "integer"
2299 x-nullable: false
2300 CPUPeriod:
2301 description: |
2302 CPU CFS (Completely Fair Scheduler) period.
2303 The length of a CPU period in microseconds.
2304 type: "integer"
2305 format: "int64"
2306 minimum: 1000
2307 maximum: 1000000
2308 x-nullable: false
2309 CPUQuota:
2310 description: |
2311 CPU CFS (Completely Fair Scheduler) quota.
2312 Microseconds of CPU time that the container can get in a CPU period."
2313 type: "integer"
2314 format: "int64"
2315 minimum: 1000
2316 x-nullable: false
2317 CpuRealtimePeriod:
2318 description: "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
2319 type: "integer"
2320 format: "int64"
2321 x-nullable: false
2322 CpuRealtimeRuntime:
2323 description: "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
2324 type: "integer"
2325 format: "int64"
2326 x-nullable: false
2327 CpusetCpus:
2328 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)"
2329 type: "string"
2330 example: "0-3"
2331 x-nullable: false
2332 CpusetMems:
2333 description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems."
2334 type: "string"
2335 x-nullable: false
2336 Devices:
2337 description: "A list of devices to add to the container."
2338 type: "array"
2339 items:
2340 $ref: "#/definitions/DeviceMapping"
2341 DeviceCgroupRules:
2342 description: "a list of cgroup rules to apply to the container"
2343 type: "array"
2344 items:
2345 type: "string"
2346 example: "c 13:* rwm"
2347 KernelMemory:
2348 description: "Kernel memory limit in bytes."
2349 type: "integer"
2350 format: "int64"
2351 x-nullable: false
2352 Memory:
2353 description: "Memory limit in bytes."
2354 type: "integer"
2355 default: 0
2356 x-nullable: false
2357 MemoryReservation:
2358 description: "Memory soft limit in bytes."
2359 type: "integer"
2360 format: "int64"
2361 x-nullable: false
2362 MemorySwap:
2363 description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap."
2364 type: "integer"
2365 format: "int64"
2366 x-nullable: false
2367 MemorySwappiness:
2368 description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100."
2369 type: "integer"
2370 format: "int64"
2371 minimum: 0
2372 maximum: 100
2373 NanoCPUs:
2374 description: "CPU quota in units of 10<sup>-9</sup> CPUs."
2375 type: "integer"
2376 format: "int64"
2377 x-nullable: false
2378 OomKillDisable:
2379 description: "Disable OOM Killer for the container."
2380 type: "boolean"
2381 x-nullable: true
2382 PidsLimit:
2383 description: |
2384 Tune a container's pids limit. Set -1 for unlimited. Only on Linux 4.4 does this parameter support.
2385 type: "integer"
2386 format: "int64"
2387 x-nullable: false
2388 Ulimits:
2389 description: |
2390 A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
2391 type: "array"
2392 items:
2393 $ref: "#/definitions/Ulimit"
2394 # Applicable to Windows
2395 CpuCount:
2396 description: |
2397 The number of usable CPUs (Windows only).
2398 On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
2399 type: "integer"
2400 format: "int64"
2401 x-nullable: false
2402 CpuPercent:
2403 description: |
2404 The usable percentage of the available CPUs (Windows only).
2405 On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
2406 type: "integer"
2407 format: "int64"
2408 x-nullable: false
2409 IOMaximumIOps:
2410 description: "Maximum IOps for the container system drive (Windows only)"
2411 type: "integer"
2412 format: "uint64"
2413 x-nullable: false
2414 IOMaximumBandwidth:
2415 description: "Maximum IO in bytes per second for the container system drive (Windows only)"
2416 type: "integer"
2417 format: "uint64"
2418 x-nullable: false
2419 IntelRdtL3Cbm:
2420 description: "IntelRdtL3Cbm specifies settings for Intel RDT/CAT group that the container is placed into to limit the resources (e.g., L3 cache) the container has available."
2421 type: "string"
2422 x-nullable: false
2423
2424 # applicable to AliKenerl 4.9
2425 ScheLatSwitch:
2426 description: "ScheLatSwitch enables scheduler latency count in cpuacct"
2427 type: "integer"
2428 format: "int64"
2429 x-nullable: false
2430 minimum: 0
2431 maximum: 1
2432 x-nullable: false
2433 MemoryWmarkRatio:
2434 description: |
2435 MemoryWmarkRatio is an integer value representing this container's memory low water mark percentage.
2436 The value of memory low water mark is memory.limit_in_bytes * MemoryWmarkRatio. The range is in [0, 100].
2437 type: "integer"
2438 format: "int64"
2439 x-nullable: true
2440 minimum: 0
2441 maximum: 100
2442 MemoryExtra:
2443 description: |
2444 MemoryExtra is an integer value representing this container's memory high water mark percentage.
2445 The range is in [0, 100].
2446 type: "integer"
2447 format: "int64"
2448 x-nullable: true
2449 minimum: 0
2450 maximum: 100
2451 MemoryForceEmptyCtl:
2452 description: "MemoryForceEmptyCtl represents whether to reclaim the page cache when deleting cgroup."
2453 type: "integer"
2454 format: "int64"
2455 x-nullable: false
2456 minimum: 0
2457 maximum: 1
2458
2459 ThrottleDevice:
2460 type: "object"
2461 properties:
2462 Path:
2463 description: "Device path"
2464 type: "string"
2465 Rate:
2466 description: "Rate"
2467 type: "integer"
2468 format: "uint64"
2469 x-nullable: false
2470 minimum: 0
2471
2472 WeightDevice:
2473 type: "object"
2474 description: "Weight for BlockIO Device"
2475 properties:
2476 Path:
2477 description: "Weight Device"
2478 type: "string"
2479 Weight:
2480 type: "integer"
2481 format: "uint16"
2482 x-nullable: false
2483 minimum: 0
2484
2485 DeviceMapping:
2486 type: "object"
2487 description: "A device mapping between the host and container"
2488 properties:
2489 PathOnHost:
2490 description: "path on host of the device mapping"
2491 type: "string"
2492 PathInContainer:
2493 description: "path in container of the device mapping"
2494 type: "string"
2495 CgroupPermissions:
2496 description: "cgroup permissions of the device"
2497 type: "string"
2498 example:
2499 PathOnHost: "/dev/deviceName"
2500 PathInContainer: "/dev/deviceName"
2501 CgroupPermissions: "mrw"
2502
2503 Ulimit:
2504 type: "object"
2505 description: "A list of resource limits"
2506 properties:
2507 Name:
2508 description: "Name of ulimit"
2509 type: "string"
2510 Soft:
2511 description: "Soft limit"
2512 type: "integer"
2513 Hard:
2514 description: "Hard limit"
2515 type: "integer"
2516
2517 Container:
2518 description: |
2519 an array of Container contains response of Engine API:
2520 GET "/containers/json"
2521 type: "object"
2522 properties:
2523 Id:
2524 description: "Container ID"
2525 type: "string"
2526 Names:
2527 type: "array"
2528 items:
2529 type: "string"
2530 example:
2531 - "container_1"
2532 - "container_2"
2533 Image:
2534 type: "string"
2535 ImageID:
2536 type: "string"
2537 Command:
2538 type: "string"
2539 Created:
2540 description: "Created time of container in daemon."
2541 type: "integer"
2542 format: "int64"
2543 SizeRw:
2544 type: "integer"
2545 format: "int64"
2546 SizeRootFs:
2547 type: "integer"
2548 format: "int64"
2549 Labels:
2550 type: "object"
2551 additionalProperties:
2552 type: "string"
2553 State:
2554 type: "string"
2555 Status:
2556 type: "string"
2557 HostConfig:
2558 description: |
2559 In Moby's API, HostConfig field in Container struct has following type
2560 struct { NetworkMode string `json:",omitempty"` }
2561 In Pouch, we need to pick runtime field in HostConfig from daemon side to judge runtime type,
2562 So Pouch changes this type to be the complete HostConfig.
2563 Incompatibility exists, ATTENTION.
2564 $ref: "#/definitions/HostConfig"
2565 x-nullable: false
2566 Mounts:
2567 type: "array"
2568 description: "Set of mount point in a container."
2569 items:
2570 $ref: "#/definitions/MountPoint"
2571 NetworkSettings:
2572 type: "object"
2573 properties:
2574 Networks:
2575 additionalProperties:
2576 $ref: "#/definitions/EndpointSettings"
2577 x-nullable: true
2578
2579 NetworkingConfig:
2580 description: "Configuration for a network used to create a container."
2581 type: "object"
2582 properties:
2583 EndpointsConfig:
2584 additionalProperties:
2585 $ref: "#/definitions/EndpointSettings"
2586 x-nullable: true
2587
2588 EndpointSettings:
2589 description: "Configuration for a network endpoint."
2590 type: "object"
2591 properties:
2592 # Configurations
2593 IPAMConfig:
2594 $ref: "#/definitions/EndpointIPAMConfig"
2595 x-nullable: true
2596 Links:
2597 type: "array"
2598 items:
2599 type: "string"
2600 example:
2601 - "container_1"
2602 - "container_2"
2603 Aliases:
2604 type: "array"
2605 items:
2606 type: "string"
2607 example:
2608 - "server_x"
2609 - "server_y"
2610
2611 # Operational data
2612 NetworkID:
2613 description: |
2614 Unique ID of the network.
2615 type: "string"
2616 example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a"
2617 EndpointID:
2618 description: |
2619 Unique ID for the service endpoint in a Sandbox.
2620 type: "string"
2621 example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
2622 Gateway:
2623 description: |
2624 Gateway address for this network.
2625 type: "string"
2626 example: "172.17.0.1"
2627 IPAddress:
2628 description: |
2629 IPv4 address.
2630 type: "string"
2631 example: "172.17.0.4"
2632 IPPrefixLen:
2633 description: |
2634 Mask length of the IPv4 address.
2635 type: "integer"
2636 example: 16
2637 IPv6Gateway:
2638 description: |
2639 IPv6 gateway address.
2640 type: "string"
2641 example: "2001:db8:2::100"
2642 GlobalIPv6Address:
2643 description: |
2644 Global IPv6 address.
2645 type: "string"
2646 example: "2001:db8::5689"
2647 GlobalIPv6PrefixLen:
2648 description: |
2649 Mask length of the global IPv6 address.
2650 type: "integer"
2651 format: "int64"
2652 example: 64
2653 MacAddress:
2654 description: |
2655 MAC address for the endpoint on this network.
2656 type: "string"
2657 example: "02:42:ac:11:00:04"
2658 DriverOpts:
2659 description: |
2660 DriverOpts is a mapping of driver options and values. These options
2661 are passed directly to the driver and are driver specific.
2662 type: "object"
2663 x-nullable: true
2664 additionalProperties:
2665 type: "string"
2666 example:
2667 com.example.some-label: "some-value"
2668 com.example.some-other-label: "some-other-value"
2669
2670 EndpointIPAMConfig:
2671 description: "IPAM configurations for the endpoint"
2672 type: "object"
2673 properties:
2674 IPv4Address:
2675 description: "ipv4 address"
2676 type: "string"
2677 IPv6Address:
2678 description: "ipv6 address"
2679 type: "string"
2680 LinkLocalIPs:
2681 description: "link to the list of local ip"
2682 type: "array"
2683 x-nullable: false
2684 items:
2685 type: "string"
2686
2687 NetworkDisconnect:
2688 description: "Parameters of network disconnect"
2689 type: "object"
2690 properties:
2691 Container:
2692 type: "string"
2693 description: "The ID or name of the container to disconnect from the network."
2694 Force:
2695 type: "boolean"
2696 description: "Force the container to disconnect from the network."
2697
2698 ImageInfo:
2699 description: "An object containing all details of an image at API side"
2700 type: "object"
2701 properties:
2702 Id:
2703 description: "ID of an image."
2704 type: "string"
2705 x-nullable: false
2706 RepoTags:
2707 description: "repository with tag."
2708 type: "array"
2709 items:
2710 type: "string"
2711 RepoDigests:
2712 description: "repository with digest."
2713 type: "array"
2714 items:
2715 type: "string"
2716 CreatedAt:
2717 description: "time of image creation."
2718 type: "string"
2719 x-nullable: false
2720 Size:
2721 description: "size of image's taking disk space."
2722 type: "integer"
2723 x-nullable: false
2724 Config:
2725 $ref: "#/definitions/ContainerConfig"
2726 Architecture:
2727 description: "the CPU architecture."
2728 type: "string"
2729 x-nullable: false
2730 Os:
2731 description: "the name of the operating system."
2732 type: "string"
2733 x-nullable: false
2734 RootFS:
2735 description: "the rootfs key references the layer content addresses used by the image."
2736 type: "object"
2737 required: [Type]
2738 properties:
2739 Type:
2740 description: "type of the rootfs"
2741 type: "string"
2742 x-nullable: false
2743 Layers:
2744 description: "an array of layer content hashes"
2745 type: "array"
2746 items:
2747 type: "string"
2748 BaseLayer:
2749 description: "the base layer content hash."
2750 type: "string"
2751
2752 SearchResultItem:
2753 type: "object"
2754 description: "search result item in search results."
2755 properties:
2756 description:
2757 type: "string"
2758 description: "description just shows the description of this image"
2759 is_official:
2760 type: "boolean"
2761 description: "is_official shows if this image is marked official."
2762 is_automated:
2763 type: "boolean"
2764 description: "is_automated means whether this image is automated."
2765 name:
2766 type: "string"
2767 description: "name represents the name of this image"
2768 star_count:
2769 type: "integer"
2770 description: "star_count refers to the star count of this image."
2771
2772 VolumeInfo:
2773 type: "object"
2774 description: "Volume represents the configuration of a volume for the container."
2775 properties:
2776 Name:
2777 description: "Name is the name of the volume."
2778 type: "string"
2779 Driver:
2780 description: "Driver is the Driver name used to create the volume."
2781 type: "string"
2782 Mountpoint:
2783 description: "Mountpoint is the location on disk of the volume."
2784 type: "string"
2785 CreatedAt:
2786 type: "string"
2787 format: "dateTime"
2788 description: "Date/Time the volume was created."
2789 Status:
2790 description: "Status provides low-level status information about the volume."
2791 type: "object"
2792 additionalProperties:
2793 type: "object"
2794 enum:
2795 - {}
2796 default: {}
2797 Labels:
2798 description: "Labels is metadata specific to the volume."
2799 type: "object"
2800 additionalProperties:
2801 type: "string"
2802 Scope:
2803 description: |
2804 Scope describes the level at which the volume exists
2805 (e.g. `global` for cluster-wide or `local` for machine level)
2806 type: "string"
2807
2808 VolumeCreateConfig:
2809 description: "config used to create a volume"
2810 type: "object"
2811 properties:
2812 Name:
2813 description: "The new volume's name. If not specified, Pouch generates a name."
2814 type: "string"
2815 x-nullable: false
2816 Driver:
2817 description: "Name of the volume driver to use."
2818 type: "string"
2819 default: "local"
2820 x-nullable: false
2821 DriverOpts:
2822 description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific."
2823 type: "object"
2824 additionalProperties:
2825 type: "string"
2826 Labels:
2827 description: "User-defined key/value metadata."
2828 type: "object"
2829 additionalProperties:
2830 type: "string"
2831 example:
2832 Name: "tardis"
2833 Labels:
2834 com.example.some-label: "some-value"
2835 com.example.some-other-label: "some-other-value"
2836 Driver: "custom"
2837
2838 VolumeListResp:
2839 type: "object"
2840 required: [Volumes, Warnings]
2841 properties:
2842 Volumes:
2843 type: "array"
2844 x-nullable: false
2845 description: "List of volumes"
2846 items:
2847 $ref: "#/definitions/VolumeInfo"
2848 Warnings:
2849 type: "array"
2850 x-nullable: false
2851 description: "Warnings that occurred when fetching the list of volumes"
2852 items:
2853 type: "string"
2854
2855 ExecCreateConfig:
2856 type: "object"
2857 description: is a small subset of the Config struct that holds the configuration.
2858 properties:
2859 User:
2860 type: "string"
2861 description: "User that will run the command"
2862 x-nullable: false
2863 Privileged:
2864 type: "boolean"
2865 description: "Is the container in privileged mode"
2866 Tty:
2867 type: "boolean"
2868 description: "Attach standard streams to a tty"
2869 AttachStdin:
2870 type: "boolean"
2871 description: "Attach the standard input, makes possible user interaction"
2872 AttachStderr:
2873 type: "boolean"
2874 description: "Attach the standard error"
2875 AttachStdout:
2876 type: "boolean"
2877 description: "Attach the standard output"
2878 Detach:
2879 type: "boolean"
2880 description: "Execute in detach mode"
2881 DetachKeys:
2882 type: "string"
2883 description: "Escape keys for detach"
2884 Cmd:
2885 type: "array"
2886 description: "Execution commands and args"
2887 minItems: 1
2888 items:
2889 type: "string"
2890 ContainerProcessList:
2891 description: OK Response to ContainerTop operation
2892 type: "object"
2893 properties:
2894 Titles:
2895 description: "The ps column titles"
2896 type: "array"
2897 items:
2898 type: "string"
2899 Processes:
2900 description: "Each process running in the container, where each is process is an array of values corresponding to the titles"
2901 type: "array"
2902 items:
2903 type: "array"
2904 items:
2905 type: "string"
2906
2907 ExecCreateResp:
2908 type: "object"
2909 description: contains response of Remote API POST "/containers/{name:.*}/exec".
2910 properties:
2911 Id:
2912 type: "string"
2913 description: ID is the exec ID
2914
2915 ExecStartConfig:
2916 type: "object"
2917 description: ExecStartConfig is a temp struct used by execStart.
2918 properties:
2919 Detach:
2920 description: ExecStart will first check if it's detached
2921 type: "boolean"
2922 Tty:
2923 description: Check if there's a tty
2924 type: "boolean"
2925 example:
2926 Detach: false
2927 Tty: false
2928
2929 ContainerExecInspect:
2930 type: "object"
2931 description: holds information about a running process started.
2932 required: [ID, Running, ExitCode, ProcessConfig, OpenStdin, OpenStderr, OpenStdout, CanRemove, ContainerID, DetachKeys]
2933 properties:
2934 ID:
2935 x-nullable: false
2936 type: "string"
2937 description: "The ID of this exec"
2938 Running:
2939 x-nullable: false
2940 type: "boolean"
2941 ExitCode:
2942 x-nullable: false
2943 type: "integer"
2944 description: "The last exit code of this container"
2945 ProcessConfig:
2946 x-nullable: false
2947 $ref: "#/definitions/ProcessConfig"
2948 OpenStdin:
2949 x-nullable: false
2950 type: "boolean"
2951 OpenStderr:
2952 x-nullable: false
2953 type: "boolean"
2954 OpenStdout:
2955 x-nullable: false
2956 type: "boolean"
2957 CanRemove:
2958 x-nullable: false
2959 type: "boolean"
2960 ContainerID:
2961 x-nullable: false
2962 type: "string"
2963 description: "The ID of this container"
2964 DetachKeys:
2965 x-nullable: false
2966 type: "string"
2967
2968 ProcessConfig:
2969 type: "object"
2970 description: ExecProcessConfig holds information about the exec process.
2971 required: [privileged, user, tty, entrypoint, arguments]
2972 properties:
2973 privileged:
2974 x-nullable: false
2975 type: "boolean"
2976 user:
2977 x-nullable: false
2978 type: "string"
2979 tty:
2980 x-nullable: false
2981 type: "boolean"
2982 entrypoint:
2983 x-nullable: false
2984 type: "string"
2985 arguments:
2986 x-nullable: false
2987 type: "array"
2988 items:
2989 type: "string"
2990
2991 ContainerJSON:
2992 description: |
2993 ContainerJSON contains response of Engine API:
2994 GET "/containers/{id}/json"
2995 type: "object"
2996 properties:
2997 Id:
2998 description: "The ID of the container"
2999 type: "string"
3000 Created:
3001 description: "The time the container was created"
3002 type: "string"
3003 Path:
3004 description: "The path to the command being run"
3005 type: "string"
3006 Args:
3007 description: "The arguments to the command being run"
3008 type: "array"
3009 items:
3010 type: "string"
3011 State:
3012 description: "The state of the container."
3013 $ref: "#/definitions/ContainerState"
3014 Image:
3015 description: "The container's image"
3016 type: "string"
3017 ResolvConfPath:
3018 type: "string"
3019 HostnamePath:
3020 type: "string"
3021 HostsPath:
3022 type: "string"
3023 LogPath:
3024 type: "string"
3025 Name:
3026 type: "string"
3027 RestartCount:
3028 type: "integer"
3029 Driver:
3030 type: "string"
3031 MountLabel:
3032 type: "string"
3033 ProcessLabel:
3034 type: "string"
3035 AppArmorProfile:
3036 type: "string"
3037 ExecIDs:
3038 description: "exec ids of container"
3039 type: "array"
3040 items:
3041 type: "string"
3042 HostConfig:
3043 $ref: "#/definitions/HostConfig"
3044 SizeRw:
3045 description: "The size of files that have been created or changed by this container."
3046 type: "integer"
3047 format: "int64"
3048 x-nullable: true
3049 SizeRootFs:
3050 description: "The total size of all the files in this container."
3051 type: "integer"
3052 format: "int64"
3053 x-nullable: true
3054 Config:
3055 $ref: "#/definitions/ContainerConfig"
3056 Snapshotter:
3057 $ref: "#/definitions/SnapshotterData"
3058 GraphDriver:
3059 $ref: "#/definitions/GraphDriverData"
3060 Mounts:
3061 type: "array"
3062 description: "Set of mount point in a container."
3063 items:
3064 $ref: "#/definitions/MountPoint"
3065 NetworkSettings:
3066 description: "NetworkSettings exposes the network settings in the API."
3067 $ref: "#/definitions/NetworkSettings"
3068
3069 ContainerState:
3070 type: "object"
3071 required: [StartedAt, FinishedAt]
3072 properties:
3073 Status:
3074 $ref: "#/definitions/Status"
3075 Running:
3076 description: |
3077 Whether this container is running.
3078
3079 Note that a running container can be _paused_. The `Running` and `Paused`
3080 booleans are not mutually exclusive:
3081
3082 When pausing a container (on Linux), the cgroups freezer is used to suspend
3083 all processes in the container. Freezing the process requires the process to
3084 be running. As a result, paused containers are both `Running` _and_ `Paused`.
3085
3086 Use the `Status` field instead to determine if a container's state is "running".
3087 type: "boolean"
3088 Paused:
3089 description: "Whether this container is paused."
3090 type: "boolean"
3091 Restarting:
3092 description: "Whether this container is restarting."
3093 type: "boolean"
3094 OOMKilled:
3095 description: "Whether this container has been killed because it ran out of memory."
3096 type: "boolean"
3097 Dead:
3098 description: "Whether this container is dead."
3099 type: "boolean"
3100 Pid:
3101 description: "The process ID of this container"
3102 type: "integer"
3103 ExitCode:
3104 description: "The last exit code of this container"
3105 type: "integer"
3106 Error:
3107 description: "The error message of this container"
3108 type: "string"
3109 StartedAt:
3110 description: "The time when this container was last started."
3111 type: "string"
3112 x-nullable: false
3113 FinishedAt:
3114 description: "The time when this container last exited."
3115 type: "string"
3116 x-nullable: false
3117
3118 ContainerLogsOptions:
3119 type: "object"
3120 properties:
3121 ShowStdout:
3122 description: "Return logs from `stdout`"
3123 type: "boolean"
3124 ShowStderr:
3125 description: "Return logs from `stderr`"
3126 type: "boolean"
3127 Since:
3128 description: "Only return logs after this time, as a UNIX timestamp"
3129 type: "string"
3130 Until:
3131 description: "Only reture logs before this time, as a UNIX timestamp"
3132 type: "string"
3133 Timestamps:
3134 description: "Add timestamps to every log line"
3135 type: "boolean"
3136 Follow:
3137 description: "Return logs as a stream"
3138 type: "boolean"
3139 Tail:
3140 description: "Only reture this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines."
3141 type: "string"
3142 Details:
3143 description: "Show extra details provided to logs"
3144 type: "boolean"
3145
3146
3147 description: The parameters to filter the log.
3148
3149
3150 Status:
3151 description: The status of the container. For example, "running" or "exited".
3152 type: "string"
3153 enum: ["created", "running", "stopped", "paused", "restarting", "removing", "exited", "dead"]
3154
3155 SnapshotterData:
3156 description: "Information about a container's snapshotter."
3157 type: "object"
3158 required: [Name, Data]
3159 properties:
3160 Name:
3161 type: "string"
3162 x-nullable: false
3163 Data:
3164 type: "object"
3165 x-nullable: false
3166 additionalProperties:
3167 type: "string"
3168
3169 GraphDriverData:
3170 description: "Information about a container's graph driver."
3171 type: "object"
3172 required: [Name, Data]
3173 properties:
3174 Name:
3175 type: "string"
3176 x-nullable: false
3177 Data:
3178 type: "object"
3179 x-nullable: false
3180 additionalProperties:
3181 type: "string"
3182
3183 MountPoint:
3184 type: "object"
3185 description: "A mount point inside a container"
3186 x-nullable: false
3187 properties:
3188 Type:
3189 type: "string"
3190 ID:
3191 type: "string"
3192 Name:
3193 type: "string"
3194 Source:
3195 type: "string"
3196 Destination:
3197 type: "string"
3198 Driver:
3199 type: "string"
3200 Mode:
3201 type: "string"
3202 RW:
3203 type: "boolean"
3204 CopyData:
3205 type: "boolean"
3206 Named:
3207 type: "boolean"
3208 Replace:
3209 type: "string"
3210 Propagation:
3211 type: "string"
3212
3213 NetworkSettings:
3214 description: "NetworkSettings exposes the network settings in the API."
3215 type: "object"
3216 properties:
3217 Bridge:
3218 description: Name of the network'a bridge (for example, `pouch-br`).
3219 type: "string"
3220 example: "pouch-br"
3221 SandboxID:
3222 description: SandboxID uniquely represents a container's network stack.
3223 type: "string"
3224 example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3"
3225 HairpinMode:
3226 description: "Indicates if hairpin NAT should be enabled on the virtual interface"
3227 type: "boolean"
3228 example: false
3229 LinkLocalIPv6Address:
3230 description: "IPv6 unicast address using the link-local prefix"
3231 type: "string"
3232 example: "fe80::42:acff:fe11:1"
3233 LinkLocalIPv6PrefixLen:
3234 description: Prefix length of the IPv6 unicast address.
3235 type: "integer"
3236 example: "64"
3237 Ports:
3238 $ref: "#/definitions/PortMap"
3239 SandboxKey:
3240 description: SandboxKey identifies the sandbox
3241 type: "string"
3242 example: "/var/run/pouch/netns/8ab54b426c38"
3243
3244 # TODO is SecondaryIPAddresses actually used?
3245 SecondaryIPAddresses:
3246 description: ""
3247 type: "array"
3248 items:
3249 $ref: "#/definitions/IPAddress"
3250 x-nullable: true
3251
3252 # TODO is SecondaryIPv6Addresses actually used?
3253 SecondaryIPv6Addresses:
3254 description: ""
3255 type: "array"
3256 items:
3257 $ref: "#/definitions/IPAddress"
3258 x-nullable: true
3259 Networks:
3260 description: "Information about all networks that the container is connected to"
3261 type: "object"
3262 additionalProperties:
3263 $ref: "#/definitions/EndpointSettings"
3264 x-nullable: true
3265
3266 IPAddress:
3267 description: Address represents an IPv4 or IPv6 IP address.
3268 type: "object"
3269 properties:
3270 Addr:
3271 description: IP address.
3272 type: "string"
3273 PrefixLen:
3274 description: Mask length of the IP address.
3275 type: "integer"
3276
3277 PortMap:
3278 description: |
3279 PortMap describes the mapping of container ports to host ports, using the
3280 container's port-number and protocol as key in the format `<port>/<protocol>`,
3281 for example, `80/udp`.
3282
3283 If a container's port is mapped for both `tcp` and `udp`, two separate
3284 entries are added to the mapping table.
3285 type: "object"
3286 additionalProperties:
3287 type: "array"
3288 items:
3289 $ref: "#/definitions/PortBinding"
3290 example:
3291 "443/tcp":
3292 - HostIp: "127.0.0.1"
3293 HostPort: "4443"
3294 "80/tcp":
3295 - HostIp: "0.0.0.0"
3296 HostPort: "80"
3297 - HostIp: "0.0.0.0"
3298 HostPort: "8080"
3299 "80/udp":
3300 - HostIp: "0.0.0.0"
3301 HostPort: "80"
3302 "2377/tcp": null
3303
3304 PortBinding:
3305 description: "PortBinding represents a binding between a host IP address and a host port"
3306 type: "object"
3307 x-nullable: true
3308 properties:
3309 HostIp:
3310 description: "Host IP address that the container's port is mapped to."
3311 type: "string"
3312 example: "127.0.0.1"
3313 HostPort:
3314 description: "Host port number that the container's port is mapped to."
3315 type: "string"
3316 example: "4443"
3317
3318 RestartPolicy:
3319 description: "Define container's restart policy"
3320 type: "object"
3321 properties:
3322 Name:
3323 type: "string"
3324 MaximumRetryCount:
3325 type: "integer"
3326
3327 NetworkConnect:
3328 type: "object"
3329 description: "contains the request for the remote API: POST /networks/{id:.*}/connect"
3330 properties:
3331 Container:
3332 type: "string"
3333 description: "The ID or name of the container to connect to the network."
3334 EndpointConfig:
3335 $ref: "#/definitions/EndpointSettings"
3336
3337 NetworkCreateConfig:
3338 type: "object"
3339 description: "contains the request for the remote API: POST /networks/create"
3340 allOf:
3341 - properties:
3342 Name:
3343 description: "Name is the name of the network."
3344 type: "string"
3345 - $ref: "#/definitions/NetworkCreate"
3346
3347 NetworkCreateResp:
3348 type: "object"
3349 description: "contains the response for the remote API: POST /networks/create"
3350 properties:
3351 Id:
3352 description: "ID is the id of the network."
3353 type: "string"
3354 Warning:
3355 description: "Warning means the message of create network result."
3356 type: "string"
3357
3358 NetworkCreate:
3359 type: "object"
3360 description: "is the expected body of the \"create network\" http request message"
3361 properties:
3362 CheckDuplicate:
3363 type: "boolean"
3364 description: "CheckDuplicate is used to check the network is duplicate or not."
3365 Driver:
3366 type: "string"
3367 description: "Driver means the network's driver."
3368 EnableIPv6:
3369 type: "boolean"
3370 IPAM:
3371 type: "object"
3372 $ref: "#/definitions/IPAM"
3373 Internal:
3374 type: "boolean"
3375 description: "Internal checks the network is internal network or not."
3376 Options:
3377 type: "object"
3378 additionalProperties:
3379 type: "string"
3380 Labels:
3381 type: "object"
3382 additionalProperties:
3383 type: "string"
3384
3385 NetworkInspectResp:
3386 type: "object"
3387 description: "is the expected body of the 'GET networks/{id}'' http request message"
3388 properties:
3389 Name:
3390 type: "string"
3391 description: "Name is the requested name of the network"
3392 Id:
3393 type: "string"
3394 description: "ID uniquely identifies a network on a single machine"
3395 Scope:
3396 type: "string"
3397 description: "Scope describes the level at which the network exists."
3398 Driver:
3399 type: "string"
3400 description: "Driver means the network's driver."
3401 EnableIPv6:
3402 type: "boolean"
3403 description: "EnableIPv6 represents whether to enable IPv6."
3404 IPAM:
3405 type: "object"
3406 description: "IPAM is the network's IP Address Management."
3407 $ref: "#/definitions/IPAM"
3408 Internal:
3409 type: "boolean"
3410 description: "Internal checks the network is internal network or not."
3411 Options:
3412 type: "object"
3413 description: "Options holds the network specific options to use for when creating the network."
3414 additionalProperties:
3415 type: "string"
3416 Labels:
3417 type: "object"
3418 description: "Labels holds metadata specific to the network being created."
3419 additionalProperties:
3420 type: "string"
3421
3422 NetworkResource:
3423 type: "object"
3424 description: "NetworkResource is the body of the \"get network\" http response message"
3425 properties:
3426 Name:
3427 description: "Name is the requested name of the network"
3428 type: "string"
3429 Id:
3430 description: "ID uniquely identifies a network on a single machine"
3431 type: "string"
3432 Scope:
3433 description: "Scope describes the level at which the network exists (e.g. `global` for cluster-wide or `local` for machine level)"
3434 type: "string"
3435 Driver:
3436 description: "Driver is the Driver name used to create the network (e.g. `bridge`, `overlay`)"
3437 type: "string"
3438 EnableIPv6:
3439 description: "EnableIPv6 represents whether to enable IPv6"
3440 type: "boolean"
3441 IPAM:
3442 description: ""
3443 type: "object"
3444 $ref: "#/definitions/IPAM"
3445 Internal:
3446 description: "Internal represents if the network is used internal only"
3447 type: "boolean"
3448 Containers:
3449 description: "Containers contains endpoints belonging to the network"
3450 type: "object"
3451 IndexConfigs:
3452 type: "object"
3453 additionalProperties:
3454 $ref: "#/definitions/EndpointResource"
3455 Options:
3456 description: "Options holds the network specific options to use for when creating the network"
3457 type: "object"
3458 x-nullable: true
3459 additionalProperties:
3460 type: "string"
3461 example:
3462 com.example.some-options: "some-option"
3463 com.example.some-other-options: "some-other-option"
3464 Labels:
3465 description: "Labels holds metadata specific to the network being created"
3466 type: "object"
3467 x-nullable: true
3468 additionalProperties:
3469 type: "string"
3470 example:
3471 com.example.some-label: "some-label"
3472 com.example.some-other-label: "some-other-label"
3473
3474 EndpointResource:
3475 type: "object"
3476 description: "NetworkResource is the body of the \"get network\" http response message"
3477 properties:
3478 Name:
3479 description: "Name is the requested name of the network"
3480 type: "string"
3481 EndpointID:
3482 description: "EndpointID represents the endpoint's id"
3483 type: "string"
3484 MacAddress:
3485 description: "MacAddress represents the enpoint's mac address"
3486 type: "string"
3487 IPv4Address:
3488 description: "IPv4Address represents the enpoint's ipv4 address"
3489 type: "string"
3490 IPv6Address:
3491 description: "IPv4Address represents the enpoint's ipv6 address"
3492 type: "string"
3493
3494 IPAM:
3495 type: "object"
3496 description: "represents IP Address Management"
3497 properties:
3498 Driver:
3499 type: "string"
3500 Options:
3501 type: "object"
3502 additionalProperties:
3503 type: "string"
3504 Config:
3505 type: "array"
3506 items:
3507 $ref: '#/definitions/IPAMConfig'
3508
3509 IPAMConfig:
3510 description: "represents IPAM configurations"
3511 type: "object"
3512 x-nullable: false
3513 properties:
3514 Subnet:
3515 description: "subnet address for network"
3516 type: "string"
3517 IPRange:
3518 description: "sub ip range in sub-network"
3519 type: "string"
3520 Gateway:
3521 description: "gateway for sub-network"
3522 type: "string"
3523 AuxAddress:
3524 description: "aux address in sub-network"
3525 type: "object"
3526 additionalProperties:
3527 type: "string"
3528
3529 ResizeOptions:
3530 description: "options of resizing container tty size"
3531 type: "object"
3532 properties:
3533 Height:
3534 type: "integer"
3535 Width:
3536 type: "integer"
3537
3538 ContainerRemoveOptions:
3539 description: "options of remove container"
3540 type: "object"
3541 properties:
3542 Force:
3543 type: "boolean"
3544 Volumes:
3545 type: "boolean"
3546 Link:
3547 type: "boolean"
3548
3549 ContainerListOptions:
3550 description: |
3551 options of list container, filters (a `map[string][]string`) to process on the container list. Available filters:
3552
3553 - `id=container-id`
3554 - `name=container-name`
3555 - `status=running`
3556 - `label=key` or `label=key=value`
3557 - `network=container-network`
3558 - `volume=volume-id`
3559 type: "object"
3560 properties:
3561 All:
3562 type: "boolean"
3563 Since:
3564 type: "string"
3565 Before:
3566 type: "string"
3567 Limit:
3568 type: "integer"
3569 Filter:
3570 type: "object"
3571 additionalProperties:
3572 type: "array"
3573 items:
3574 type: "string"
3575
3576parameters:
3577 id:
3578 name: id
3579 in: path
3580 required: true
3581 description: ID or name of the container
3582 type: string
3583 imageid:
3584 name: imageid
3585 in: path
3586 required: true
3587 description: Image name or id
3588 type: string
3589
3590responses:
3591 401ErrorResponse:
3592 description: An unexpected 401 error occurred.
3593 schema:
3594 $ref: "#/definitions/Error"
3595 404ErrorResponse:
3596 description: An unexpected 404 error occurred.
3597 schema:
3598 $ref: "#/definitions/Error"
3599 500ErrorResponse:
3600 description: An unexpected server error occurred.
3601 schema:
3602 $ref: "#/definitions/Error"
View as plain text