github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/api/swagger.yaml (about) 1 # A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. 2 # 3 # This is used for generating API documentation and the types used by the 4 # client/server. See api/README.md for more information. 5 # 6 # Some style notes: 7 # - This file is used by ReDoc, which allows GitHub Flavored Markdown in 8 # descriptions. 9 # - There is no maximum line length, for ease of editing and pretty diffs. 10 # - operationIds are in the format "NounVerb", with a singular noun. 11 12 swagger: "2.0" 13 schemes: 14 - "http" 15 - "https" 16 produces: 17 - "application/json" 18 - "text/plain" 19 consumes: 20 - "application/json" 21 - "text/plain" 22 basePath: "/v1.41" 23 info: 24 title: "Docker Engine API" 25 version: "1.41" 26 x-logo: 27 url: "https://docs.docker.com/images/logo-docker-main.png" 28 description: | 29 The Engine API is an HTTP API served by Docker Engine. It is the API the 30 Docker client uses to communicate with the Engine, so everything the Docker 31 client can do can be done with the API. 32 33 Most of the client's commands map directly to API endpoints (e.g. `docker ps` 34 is `GET /containers/json`). The notable exception is running containers, 35 which consists of several API calls. 36 37 # Errors 38 39 The API uses standard HTTP status codes to indicate the success or failure 40 of the API call. The body of the response will be JSON in the following 41 format: 42 43 ``` 44 { 45 "message": "page not found" 46 } 47 ``` 48 49 # Versioning 50 51 The API is usually changed in each release, so API calls are versioned to 52 ensure that clients don't break. To lock to a specific version of the API, 53 you prefix the URL with its version, for example, call `/v1.30/info` to use 54 the v1.30 version of the `/info` endpoint. If the API version specified in 55 the URL is not supported by the daemon, a HTTP `400 Bad Request` error message 56 is returned. 57 58 If you omit the version-prefix, the current version of the API (v1.41) is used. 59 For example, calling `/info` is the same as calling `/v1.41/info`. Using the 60 API without a version-prefix is deprecated and will be removed in a future release. 61 62 Engine releases in the near future should support this version of the API, 63 so your client will continue to work even if it is talking to a newer Engine. 64 65 The API uses an open schema model, which means server may add extra properties 66 to responses. Likewise, the server will ignore any extra query parameters and 67 request body properties. When you write clients, you need to ignore additional 68 properties in responses to ensure they do not break when talking to newer 69 daemons. 70 71 72 # Authentication 73 74 Authentication for registries is handled client side. The client has to send 75 authentication details to various endpoints that need to communicate with 76 registries, such as `POST /images/(name)/push`. These are sent as 77 `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) 78 (JSON) string with the following structure: 79 80 ``` 81 { 82 "username": "string", 83 "password": "string", 84 "email": "string", 85 "serveraddress": "string" 86 } 87 ``` 88 89 The `serveraddress` is a domain/IP without a protocol. Throughout this 90 structure, double quotes are required. 91 92 If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), 93 you can just pass this instead of credentials: 94 95 ``` 96 { 97 "identitytoken": "9cbaf023786cd7..." 98 } 99 ``` 100 101 # The tags on paths define the menu sections in the ReDoc documentation, so 102 # the usage of tags must make sense for that: 103 # - They should be singular, not plural. 104 # - There should not be too many tags, or the menu becomes unwieldy. For 105 # example, it is preferable to add a path to the "System" tag instead of 106 # creating a tag with a single path in it. 107 # - The order of tags in this list defines the order in the menu. 108 tags: 109 # Primary objects 110 - name: "Container" 111 x-displayName: "Containers" 112 description: | 113 Create and manage containers. 114 - name: "Image" 115 x-displayName: "Images" 116 - name: "Network" 117 x-displayName: "Networks" 118 description: | 119 Networks are user-defined networks that containers can be attached to. 120 See the [networking documentation](https://docs.docker.com/network/) 121 for more information. 122 - name: "Volume" 123 x-displayName: "Volumes" 124 description: | 125 Create and manage persistent storage that can be attached to containers. 126 - name: "Exec" 127 x-displayName: "Exec" 128 description: | 129 Run new commands inside running containers. Refer to the 130 [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) 131 for more information. 132 133 To exec a command in a container, you first need to create an exec instance, 134 then start it. These two API endpoints are wrapped up in a single command-line 135 command, `docker exec`. 136 137 # Swarm things 138 - name: "Swarm" 139 x-displayName: "Swarm" 140 description: | 141 Engines can be clustered together in a swarm. Refer to the 142 [swarm mode documentation](https://docs.docker.com/engine/swarm/) 143 for more information. 144 - name: "Node" 145 x-displayName: "Nodes" 146 description: | 147 Nodes are instances of the Engine participating in a swarm. Swarm mode 148 must be enabled for these endpoints to work. 149 - name: "Service" 150 x-displayName: "Services" 151 description: | 152 Services are the definitions of tasks to run on a swarm. Swarm mode must 153 be enabled for these endpoints to work. 154 - name: "Task" 155 x-displayName: "Tasks" 156 description: | 157 A task is a container running on a swarm. It is the atomic scheduling unit 158 of swarm. Swarm mode must be enabled for these endpoints to work. 159 - name: "Secret" 160 x-displayName: "Secrets" 161 description: | 162 Secrets are sensitive data that can be used by services. Swarm mode must 163 be enabled for these endpoints to work. 164 - name: "Config" 165 x-displayName: "Configs" 166 description: | 167 Configs are application configurations that can be used by services. Swarm 168 mode must be enabled for these endpoints to work. 169 # System things 170 - name: "Plugin" 171 x-displayName: "Plugins" 172 - name: "System" 173 x-displayName: "System" 174 175 definitions: 176 Port: 177 type: "object" 178 description: "An open port on a container" 179 required: [PrivatePort, Type] 180 properties: 181 IP: 182 type: "string" 183 format: "ip-address" 184 description: "Host IP address that the container's port is mapped to" 185 PrivatePort: 186 type: "integer" 187 format: "uint16" 188 x-nullable: false 189 description: "Port on the container" 190 PublicPort: 191 type: "integer" 192 format: "uint16" 193 description: "Port exposed on the host" 194 Type: 195 type: "string" 196 x-nullable: false 197 enum: ["tcp", "udp", "sctp"] 198 example: 199 PrivatePort: 8080 200 PublicPort: 80 201 Type: "tcp" 202 203 MountPoint: 204 type: "object" 205 description: "A mount point inside a container" 206 properties: 207 Type: 208 type: "string" 209 Name: 210 type: "string" 211 Source: 212 type: "string" 213 Destination: 214 type: "string" 215 Driver: 216 type: "string" 217 Mode: 218 type: "string" 219 RW: 220 type: "boolean" 221 Propagation: 222 type: "string" 223 224 DeviceMapping: 225 type: "object" 226 description: "A device mapping between the host and container" 227 properties: 228 PathOnHost: 229 type: "string" 230 PathInContainer: 231 type: "string" 232 CgroupPermissions: 233 type: "string" 234 example: 235 PathOnHost: "/dev/deviceName" 236 PathInContainer: "/dev/deviceName" 237 CgroupPermissions: "mrw" 238 239 DeviceRequest: 240 type: "object" 241 description: "A request for devices to be sent to device drivers" 242 properties: 243 Driver: 244 type: "string" 245 example: "nvidia" 246 Count: 247 type: "integer" 248 example: -1 249 DeviceIDs: 250 type: "array" 251 items: 252 type: "string" 253 example: 254 - "0" 255 - "1" 256 - "GPU-fef8089b-4820-abfc-e83e-94318197576e" 257 Capabilities: 258 description: | 259 A list of capabilities; an OR list of AND lists of capabilities. 260 type: "array" 261 items: 262 type: "array" 263 items: 264 type: "string" 265 example: 266 # gpu AND nvidia AND compute 267 - ["gpu", "nvidia", "compute"] 268 Options: 269 description: | 270 Driver-specific options, specified as a key/value pairs. These options 271 are passed directly to the driver. 272 type: "object" 273 additionalProperties: 274 type: "string" 275 276 ThrottleDevice: 277 type: "object" 278 properties: 279 Path: 280 description: "Device path" 281 type: "string" 282 Rate: 283 description: "Rate" 284 type: "integer" 285 format: "int64" 286 minimum: 0 287 288 Mount: 289 type: "object" 290 properties: 291 Target: 292 description: "Container path." 293 type: "string" 294 Source: 295 description: "Mount source (e.g. a volume name, a host path)." 296 type: "string" 297 Type: 298 description: | 299 The mount type. Available types: 300 301 - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. 302 - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. 303 - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. 304 - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. 305 type: "string" 306 enum: 307 - "bind" 308 - "volume" 309 - "tmpfs" 310 - "npipe" 311 ReadOnly: 312 description: "Whether the mount should be read-only." 313 type: "boolean" 314 Consistency: 315 description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`." 316 type: "string" 317 BindOptions: 318 description: "Optional configuration for the `bind` type." 319 type: "object" 320 properties: 321 Propagation: 322 description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." 323 type: "string" 324 enum: 325 - "private" 326 - "rprivate" 327 - "shared" 328 - "rshared" 329 - "slave" 330 - "rslave" 331 NonRecursive: 332 description: "Disable recursive bind mount." 333 type: "boolean" 334 default: false 335 VolumeOptions: 336 description: "Optional configuration for the `volume` type." 337 type: "object" 338 properties: 339 NoCopy: 340 description: "Populate volume with data from the target." 341 type: "boolean" 342 default: false 343 Labels: 344 description: "User-defined key/value metadata." 345 type: "object" 346 additionalProperties: 347 type: "string" 348 DriverConfig: 349 description: "Map of driver specific options" 350 type: "object" 351 properties: 352 Name: 353 description: "Name of the driver to use to create the volume." 354 type: "string" 355 Options: 356 description: "key/value map of driver specific options." 357 type: "object" 358 additionalProperties: 359 type: "string" 360 TmpfsOptions: 361 description: "Optional configuration for the `tmpfs` type." 362 type: "object" 363 properties: 364 SizeBytes: 365 description: "The size for the tmpfs mount in bytes." 366 type: "integer" 367 format: "int64" 368 Mode: 369 description: "The permission mode for the tmpfs mount in an integer." 370 type: "integer" 371 372 RestartPolicy: 373 description: | 374 The behavior to apply when the container exits. The default is not to 375 restart. 376 377 An ever increasing delay (double the previous delay, starting at 100ms) is 378 added before each restart to prevent flooding the server. 379 type: "object" 380 properties: 381 Name: 382 type: "string" 383 description: | 384 - Empty string means not to restart 385 - `always` Always restart 386 - `unless-stopped` Restart always except when the user has manually stopped the container 387 - `on-failure` Restart only when the container exit code is non-zero 388 enum: 389 - "" 390 - "always" 391 - "unless-stopped" 392 - "on-failure" 393 MaximumRetryCount: 394 type: "integer" 395 description: | 396 If `on-failure` is used, the number of times to retry before giving up. 397 398 Resources: 399 description: "A container's resources (cgroups config, ulimits, etc)" 400 type: "object" 401 properties: 402 # Applicable to all platforms 403 CpuShares: 404 description: | 405 An integer value representing this container's relative CPU weight 406 versus other containers. 407 type: "integer" 408 Memory: 409 description: "Memory limit in bytes." 410 type: "integer" 411 format: "int64" 412 default: 0 413 # Applicable to UNIX platforms 414 CgroupParent: 415 description: | 416 Path to `cgroups` under which the container's `cgroup` is created. If 417 the path is not absolute, the path is considered to be relative to the 418 `cgroups` path of the init process. Cgroups are created if they do not 419 already exist. 420 type: "string" 421 BlkioWeight: 422 description: "Block IO weight (relative weight)." 423 type: "integer" 424 minimum: 0 425 maximum: 1000 426 BlkioWeightDevice: 427 description: | 428 Block IO weight (relative device weight) in the form: 429 430 ``` 431 [{"Path": "device_path", "Weight": weight}] 432 ``` 433 type: "array" 434 items: 435 type: "object" 436 properties: 437 Path: 438 type: "string" 439 Weight: 440 type: "integer" 441 minimum: 0 442 BlkioDeviceReadBps: 443 description: | 444 Limit read rate (bytes per second) from a device, in the form: 445 446 ``` 447 [{"Path": "device_path", "Rate": rate}] 448 ``` 449 type: "array" 450 items: 451 $ref: "#/definitions/ThrottleDevice" 452 BlkioDeviceWriteBps: 453 description: | 454 Limit write rate (bytes per second) to a device, in the form: 455 456 ``` 457 [{"Path": "device_path", "Rate": rate}] 458 ``` 459 type: "array" 460 items: 461 $ref: "#/definitions/ThrottleDevice" 462 BlkioDeviceReadIOps: 463 description: | 464 Limit read rate (IO per second) from a device, in the form: 465 466 ``` 467 [{"Path": "device_path", "Rate": rate}] 468 ``` 469 type: "array" 470 items: 471 $ref: "#/definitions/ThrottleDevice" 472 BlkioDeviceWriteIOps: 473 description: | 474 Limit write rate (IO per second) to a device, in the form: 475 476 ``` 477 [{"Path": "device_path", "Rate": rate}] 478 ``` 479 type: "array" 480 items: 481 $ref: "#/definitions/ThrottleDevice" 482 CpuPeriod: 483 description: "The length of a CPU period in microseconds." 484 type: "integer" 485 format: "int64" 486 CpuQuota: 487 description: | 488 Microseconds of CPU time that the container can get in a CPU period. 489 type: "integer" 490 format: "int64" 491 CpuRealtimePeriod: 492 description: | 493 The length of a CPU real-time period in microseconds. Set to 0 to 494 allocate no time allocated to real-time tasks. 495 type: "integer" 496 format: "int64" 497 CpuRealtimeRuntime: 498 description: | 499 The length of a CPU real-time runtime in microseconds. Set to 0 to 500 allocate no time allocated to real-time tasks. 501 type: "integer" 502 format: "int64" 503 CpusetCpus: 504 description: | 505 CPUs in which to allow execution (e.g., `0-3`, `0,1`). 506 type: "string" 507 example: "0-3" 508 CpusetMems: 509 description: | 510 Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only 511 effective on NUMA systems. 512 type: "string" 513 Devices: 514 description: "A list of devices to add to the container." 515 type: "array" 516 items: 517 $ref: "#/definitions/DeviceMapping" 518 DeviceCgroupRules: 519 description: "a list of cgroup rules to apply to the container" 520 type: "array" 521 items: 522 type: "string" 523 example: "c 13:* rwm" 524 DeviceRequests: 525 description: | 526 A list of requests for devices to be sent to device drivers. 527 type: "array" 528 items: 529 $ref: "#/definitions/DeviceRequest" 530 KernelMemory: 531 description: "Kernel memory limit in bytes." 532 type: "integer" 533 format: "int64" 534 example: 209715200 535 KernelMemoryTCP: 536 description: "Hard limit for kernel TCP buffer memory (in bytes)." 537 type: "integer" 538 format: "int64" 539 MemoryReservation: 540 description: "Memory soft limit in bytes." 541 type: "integer" 542 format: "int64" 543 MemorySwap: 544 description: | 545 Total memory limit (memory + swap). Set as `-1` to enable unlimited 546 swap. 547 type: "integer" 548 format: "int64" 549 MemorySwappiness: 550 description: | 551 Tune a container's memory swappiness behavior. Accepts an integer 552 between 0 and 100. 553 type: "integer" 554 format: "int64" 555 minimum: 0 556 maximum: 100 557 NanoCPUs: 558 description: "CPU quota in units of 10<sup>-9</sup> CPUs." 559 type: "integer" 560 format: "int64" 561 OomKillDisable: 562 description: "Disable OOM Killer for the container." 563 type: "boolean" 564 Init: 565 description: | 566 Run an init inside the container that forwards signals and reaps 567 processes. This field is omitted if empty, and the default (as 568 configured on the daemon) is used. 569 type: "boolean" 570 x-nullable: true 571 PidsLimit: 572 description: | 573 Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` 574 to not change. 575 type: "integer" 576 format: "int64" 577 x-nullable: true 578 Ulimits: 579 description: | 580 A list of resource limits to set in the container. For example: 581 582 ``` 583 {"Name": "nofile", "Soft": 1024, "Hard": 2048} 584 ``` 585 type: "array" 586 items: 587 type: "object" 588 properties: 589 Name: 590 description: "Name of ulimit" 591 type: "string" 592 Soft: 593 description: "Soft limit" 594 type: "integer" 595 Hard: 596 description: "Hard limit" 597 type: "integer" 598 # Applicable to Windows 599 CpuCount: 600 description: | 601 The number of usable CPUs (Windows only). 602 603 On Windows Server containers, the processor resource controls are 604 mutually exclusive. The order of precedence is `CPUCount` first, then 605 `CPUShares`, and `CPUPercent` last. 606 type: "integer" 607 format: "int64" 608 CpuPercent: 609 description: | 610 The usable percentage of the available CPUs (Windows only). 611 612 On Windows Server containers, the processor resource controls are 613 mutually exclusive. The order of precedence is `CPUCount` first, then 614 `CPUShares`, and `CPUPercent` last. 615 type: "integer" 616 format: "int64" 617 IOMaximumIOps: 618 description: "Maximum IOps for the container system drive (Windows only)" 619 type: "integer" 620 format: "int64" 621 IOMaximumBandwidth: 622 description: | 623 Maximum IO in bytes per second for the container system drive 624 (Windows only). 625 type: "integer" 626 format: "int64" 627 628 Limit: 629 description: | 630 An object describing a limit on resources which can be requested by a task. 631 type: "object" 632 properties: 633 NanoCPUs: 634 type: "integer" 635 format: "int64" 636 example: 4000000000 637 MemoryBytes: 638 type: "integer" 639 format: "int64" 640 example: 8272408576 641 Pids: 642 description: | 643 Limits the maximum number of PIDs in the container. Set `0` for unlimited. 644 type: "integer" 645 format: "int64" 646 default: 0 647 example: 100 648 649 ResourceObject: 650 description: | 651 An object describing the resources which can be advertised by a node and 652 requested by a task. 653 type: "object" 654 properties: 655 NanoCPUs: 656 type: "integer" 657 format: "int64" 658 example: 4000000000 659 MemoryBytes: 660 type: "integer" 661 format: "int64" 662 example: 8272408576 663 GenericResources: 664 $ref: "#/definitions/GenericResources" 665 666 GenericResources: 667 description: | 668 User-defined resources can be either Integer resources (e.g, `SSD=3`) or 669 String resources (e.g, `GPU=UUID1`). 670 type: "array" 671 items: 672 type: "object" 673 properties: 674 NamedResourceSpec: 675 type: "object" 676 properties: 677 Kind: 678 type: "string" 679 Value: 680 type: "string" 681 DiscreteResourceSpec: 682 type: "object" 683 properties: 684 Kind: 685 type: "string" 686 Value: 687 type: "integer" 688 format: "int64" 689 example: 690 - DiscreteResourceSpec: 691 Kind: "SSD" 692 Value: 3 693 - NamedResourceSpec: 694 Kind: "GPU" 695 Value: "UUID1" 696 - NamedResourceSpec: 697 Kind: "GPU" 698 Value: "UUID2" 699 700 HealthConfig: 701 description: "A test to perform to check that the container is healthy." 702 type: "object" 703 properties: 704 Test: 705 description: | 706 The test to perform. Possible values are: 707 708 - `[]` inherit healthcheck from image or parent image 709 - `["NONE"]` disable healthcheck 710 - `["CMD", args...]` exec arguments directly 711 - `["CMD-SHELL", command]` run command with system's default shell 712 type: "array" 713 items: 714 type: "string" 715 Interval: 716 description: | 717 The time to wait between checks in nanoseconds. It should be 0 or at 718 least 1000000 (1 ms). 0 means inherit. 719 type: "integer" 720 Timeout: 721 description: | 722 The time to wait before considering the check to have hung. It should 723 be 0 or at least 1000000 (1 ms). 0 means inherit. 724 type: "integer" 725 Retries: 726 description: | 727 The number of consecutive failures needed to consider a container as 728 unhealthy. 0 means inherit. 729 type: "integer" 730 StartPeriod: 731 description: | 732 Start period for the container to initialize before starting 733 health-retries countdown in nanoseconds. It should be 0 or at least 734 1000000 (1 ms). 0 means inherit. 735 type: "integer" 736 737 Health: 738 description: | 739 Health stores information about the container's healthcheck results. 740 type: "object" 741 properties: 742 Status: 743 description: | 744 Status is one of `none`, `starting`, `healthy` or `unhealthy` 745 746 - "none" Indicates there is no healthcheck 747 - "starting" Starting indicates that the container is not yet ready 748 - "healthy" Healthy indicates that the container is running correctly 749 - "unhealthy" Unhealthy indicates that the container has a problem 750 type: "string" 751 enum: 752 - "none" 753 - "starting" 754 - "healthy" 755 - "unhealthy" 756 example: "healthy" 757 FailingStreak: 758 description: "FailingStreak is the number of consecutive failures" 759 type: "integer" 760 example: 0 761 Log: 762 type: "array" 763 description: | 764 Log contains the last few results (oldest first) 765 items: 766 x-nullable: true 767 $ref: "#/definitions/HealthcheckResult" 768 769 HealthcheckResult: 770 description: | 771 HealthcheckResult stores information about a single run of a healthcheck probe 772 type: "object" 773 properties: 774 Start: 775 description: | 776 Date and time at which this check started in 777 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 778 type: "string" 779 format: "date-time" 780 example: "2020-01-04T10:44:24.496525531Z" 781 End: 782 description: | 783 Date and time at which this check ended in 784 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 785 type: "string" 786 format: "dateTime" 787 example: "2020-01-04T10:45:21.364524523Z" 788 ExitCode: 789 description: | 790 ExitCode meanings: 791 792 - `0` healthy 793 - `1` unhealthy 794 - `2` reserved (considered unhealthy) 795 - other values: error running probe 796 type: "integer" 797 example: 0 798 Output: 799 description: "Output from last check" 800 type: "string" 801 802 HostConfig: 803 description: "Container configuration that depends on the host we are running on" 804 allOf: 805 - $ref: "#/definitions/Resources" 806 - type: "object" 807 properties: 808 # Applicable to all platforms 809 Binds: 810 type: "array" 811 description: | 812 A list of volume bindings for this container. Each volume binding 813 is a string in one of these forms: 814 815 - `host-src:container-dest[:options]` to bind-mount a host path 816 into the container. Both `host-src`, and `container-dest` must 817 be an _absolute_ path. 818 - `volume-name:container-dest[:options]` to bind-mount a volume 819 managed by a volume driver into the container. `container-dest` 820 must be an _absolute_ path. 821 822 `options` is an optional, comma-delimited list of: 823 824 - `nocopy` disables automatic copying of data from the container 825 path to the volume. The `nocopy` flag only applies to named volumes. 826 - `[ro|rw]` mounts a volume read-only or read-write, respectively. 827 If omitted or set to `rw`, volumes are mounted read-write. 828 - `[z|Z]` applies SELinux labels to allow or deny multiple containers 829 to read and write to the same volume. 830 - `z`: a _shared_ content label is applied to the content. This 831 label indicates that multiple containers can share the volume 832 content, for both reading and writing. 833 - `Z`: a _private unshared_ label is applied to the content. 834 This label indicates that only the current container can use 835 a private volume. Labeling systems such as SELinux require 836 proper labels to be placed on volume content that is mounted 837 into a container. Without a label, the security system can 838 prevent a container's processes from using the content. By 839 default, the labels set by the host operating system are not 840 modified. 841 - `[[r]shared|[r]slave|[r]private]` specifies mount 842 [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). 843 This only applies to bind-mounted volumes, not internal volumes 844 or named volumes. Mount propagation requires the source mount 845 point (the location where the source directory is mounted in the 846 host operating system) to have the correct propagation properties. 847 For shared volumes, the source mount point must be set to `shared`. 848 For slave volumes, the mount must be set to either `shared` or 849 `slave`. 850 items: 851 type: "string" 852 ContainerIDFile: 853 type: "string" 854 description: "Path to a file where the container ID is written" 855 LogConfig: 856 type: "object" 857 description: "The logging configuration for this container" 858 properties: 859 Type: 860 type: "string" 861 enum: 862 - "json-file" 863 - "syslog" 864 - "journald" 865 - "gelf" 866 - "fluentd" 867 - "awslogs" 868 - "splunk" 869 - "etwlogs" 870 - "none" 871 Config: 872 type: "object" 873 additionalProperties: 874 type: "string" 875 NetworkMode: 876 type: "string" 877 description: | 878 Network mode to use for this container. Supported standard values 879 are: `bridge`, `host`, `none`, and `container:<name|id>`. Any 880 other value is taken as a custom network's name to which this 881 container should connect to. 882 PortBindings: 883 $ref: "#/definitions/PortMap" 884 RestartPolicy: 885 $ref: "#/definitions/RestartPolicy" 886 AutoRemove: 887 type: "boolean" 888 description: | 889 Automatically remove the container when the container's process 890 exits. This has no effect if `RestartPolicy` is set. 891 VolumeDriver: 892 type: "string" 893 description: "Driver that this container uses to mount volumes." 894 VolumesFrom: 895 type: "array" 896 description: | 897 A list of volumes to inherit from another container, specified in 898 the form `<container name>[:<ro|rw>]`. 899 items: 900 type: "string" 901 Mounts: 902 description: | 903 Specification for mounts to be added to the container. 904 type: "array" 905 items: 906 $ref: "#/definitions/Mount" 907 908 # Applicable to UNIX platforms 909 Capabilities: 910 type: "array" 911 description: | 912 A list of kernel capabilities to be available for container (this 913 overrides the default set). 914 915 Conflicts with options 'CapAdd' and 'CapDrop'" 916 items: 917 type: "string" 918 CapAdd: 919 type: "array" 920 description: | 921 A list of kernel capabilities to add to the container. Conflicts 922 with option 'Capabilities'. 923 items: 924 type: "string" 925 CapDrop: 926 type: "array" 927 description: | 928 A list of kernel capabilities to drop from the container. Conflicts 929 with option 'Capabilities'. 930 items: 931 type: "string" 932 CgroupnsMode: 933 type: "string" 934 enum: 935 - "private" 936 - "host" 937 description: | 938 cgroup namespace mode for the container. Possible values are: 939 940 - `"private"`: the container runs in its own private cgroup namespace 941 - `"host"`: use the host system's cgroup namespace 942 943 If not specified, the daemon default is used, which can either be `"private"` 944 or `"host"`, depending on daemon version, kernel support and configuration. 945 Dns: 946 type: "array" 947 description: "A list of DNS servers for the container to use." 948 items: 949 type: "string" 950 DnsOptions: 951 type: "array" 952 description: "A list of DNS options." 953 items: 954 type: "string" 955 DnsSearch: 956 type: "array" 957 description: "A list of DNS search domains." 958 items: 959 type: "string" 960 ExtraHosts: 961 type: "array" 962 description: | 963 A list of hostnames/IP mappings to add to the container's `/etc/hosts` 964 file. Specified in the form `["hostname:IP"]`. 965 items: 966 type: "string" 967 GroupAdd: 968 type: "array" 969 description: | 970 A list of additional groups that the container process will run as. 971 items: 972 type: "string" 973 IpcMode: 974 type: "string" 975 description: | 976 IPC sharing mode for the container. Possible values are: 977 978 - `"none"`: own private IPC namespace, with /dev/shm not mounted 979 - `"private"`: own private IPC namespace 980 - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers 981 - `"container:<name|id>"`: join another (shareable) container's IPC namespace 982 - `"host"`: use the host system's IPC namespace 983 984 If not specified, daemon default is used, which can either be `"private"` 985 or `"shareable"`, depending on daemon version and configuration. 986 Cgroup: 987 type: "string" 988 description: "Cgroup to use for the container." 989 Links: 990 type: "array" 991 description: | 992 A list of links for the container in the form `container_name:alias`. 993 items: 994 type: "string" 995 OomScoreAdj: 996 type: "integer" 997 description: | 998 An integer value containing the score given to the container in 999 order to tune OOM killer preferences. 1000 example: 500 1001 PidMode: 1002 type: "string" 1003 description: | 1004 Set the PID (Process) Namespace mode for the container. It can be 1005 either: 1006 1007 - `"container:<name|id>"`: joins another container's PID namespace 1008 - `"host"`: use the host's PID namespace inside the container 1009 Privileged: 1010 type: "boolean" 1011 description: "Gives the container full access to the host." 1012 PublishAllPorts: 1013 type: "boolean" 1014 description: | 1015 Allocates an ephemeral host port for all of a container's 1016 exposed ports. 1017 1018 Ports are de-allocated when the container stops and allocated when 1019 the container starts. The allocated port might be changed when 1020 restarting the container. 1021 1022 The port is selected from the ephemeral port range that depends on 1023 the kernel. For example, on Linux the range is defined by 1024 `/proc/sys/net/ipv4/ip_local_port_range`. 1025 ReadonlyRootfs: 1026 type: "boolean" 1027 description: "Mount the container's root filesystem as read only." 1028 SecurityOpt: 1029 type: "array" 1030 description: "A list of string values to customize labels for MLS 1031 systems, such as SELinux." 1032 items: 1033 type: "string" 1034 StorageOpt: 1035 type: "object" 1036 description: | 1037 Storage driver options for this container, in the form `{"size": "120G"}`. 1038 additionalProperties: 1039 type: "string" 1040 Tmpfs: 1041 type: "object" 1042 description: | 1043 A map of container directories which should be replaced by tmpfs 1044 mounts, and their corresponding mount options. For example: 1045 1046 ``` 1047 { "/run": "rw,noexec,nosuid,size=65536k" } 1048 ``` 1049 additionalProperties: 1050 type: "string" 1051 UTSMode: 1052 type: "string" 1053 description: "UTS namespace to use for the container." 1054 UsernsMode: 1055 type: "string" 1056 description: | 1057 Sets the usernamespace mode for the container when usernamespace 1058 remapping option is enabled. 1059 ShmSize: 1060 type: "integer" 1061 description: | 1062 Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. 1063 minimum: 0 1064 Sysctls: 1065 type: "object" 1066 description: | 1067 A list of kernel parameters (sysctls) to set in the container. 1068 For example: 1069 1070 ``` 1071 {"net.ipv4.ip_forward": "1"} 1072 ``` 1073 additionalProperties: 1074 type: "string" 1075 Runtime: 1076 type: "string" 1077 description: "Runtime to use with this container." 1078 # Applicable to Windows 1079 ConsoleSize: 1080 type: "array" 1081 description: | 1082 Initial console size, as an `[height, width]` array. (Windows only) 1083 minItems: 2 1084 maxItems: 2 1085 items: 1086 type: "integer" 1087 minimum: 0 1088 Isolation: 1089 type: "string" 1090 description: | 1091 Isolation technology of the container. (Windows only) 1092 enum: 1093 - "default" 1094 - "process" 1095 - "hyperv" 1096 MaskedPaths: 1097 type: "array" 1098 description: | 1099 The list of paths to be masked inside the container (this overrides 1100 the default set of paths). 1101 items: 1102 type: "string" 1103 ReadonlyPaths: 1104 type: "array" 1105 description: | 1106 The list of paths to be set as read-only inside the container 1107 (this overrides the default set of paths). 1108 items: 1109 type: "string" 1110 1111 ContainerConfig: 1112 description: "Configuration for a container that is portable between hosts" 1113 type: "object" 1114 properties: 1115 Hostname: 1116 description: "The hostname to use for the container, as a valid RFC 1123 hostname." 1117 type: "string" 1118 Domainname: 1119 description: "The domain name to use for the container." 1120 type: "string" 1121 User: 1122 description: "The user that commands are run as inside the container." 1123 type: "string" 1124 AttachStdin: 1125 description: "Whether to attach to `stdin`." 1126 type: "boolean" 1127 default: false 1128 AttachStdout: 1129 description: "Whether to attach to `stdout`." 1130 type: "boolean" 1131 default: true 1132 AttachStderr: 1133 description: "Whether to attach to `stderr`." 1134 type: "boolean" 1135 default: true 1136 ExposedPorts: 1137 description: | 1138 An object mapping ports to an empty object in the form: 1139 1140 `{"<port>/<tcp|udp|sctp>": {}}` 1141 type: "object" 1142 additionalProperties: 1143 type: "object" 1144 enum: 1145 - {} 1146 default: {} 1147 Tty: 1148 description: | 1149 Attach standard streams to a TTY, including `stdin` if it is not closed. 1150 type: "boolean" 1151 default: false 1152 OpenStdin: 1153 description: "Open `stdin`" 1154 type: "boolean" 1155 default: false 1156 StdinOnce: 1157 description: "Close `stdin` after one attached client disconnects" 1158 type: "boolean" 1159 default: false 1160 Env: 1161 description: | 1162 A list of environment variables to set inside the container in the 1163 form `["VAR=value", ...]`. A variable without `=` is removed from the 1164 environment, rather than to have an empty value. 1165 type: "array" 1166 items: 1167 type: "string" 1168 Cmd: 1169 description: | 1170 Command to run specified as a string or an array of strings. 1171 type: "array" 1172 items: 1173 type: "string" 1174 Healthcheck: 1175 $ref: "#/definitions/HealthConfig" 1176 ArgsEscaped: 1177 description: "Command is already escaped (Windows only)" 1178 type: "boolean" 1179 Image: 1180 description: | 1181 The name of the image to use when creating the container/ 1182 type: "string" 1183 Volumes: 1184 description: | 1185 An object mapping mount point paths inside the container to empty 1186 objects. 1187 type: "object" 1188 additionalProperties: 1189 type: "object" 1190 enum: 1191 - {} 1192 default: {} 1193 WorkingDir: 1194 description: "The working directory for commands to run in." 1195 type: "string" 1196 Entrypoint: 1197 description: | 1198 The entry point for the container as a string or an array of strings. 1199 1200 If the array consists of exactly one empty string (`[""]`) then the 1201 entry point is reset to system default (i.e., the entry point used by 1202 docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). 1203 type: "array" 1204 items: 1205 type: "string" 1206 NetworkDisabled: 1207 description: "Disable networking for the container." 1208 type: "boolean" 1209 MacAddress: 1210 description: "MAC address of the container." 1211 type: "string" 1212 OnBuild: 1213 description: | 1214 `ONBUILD` metadata that were defined in the image's `Dockerfile`. 1215 type: "array" 1216 items: 1217 type: "string" 1218 Labels: 1219 description: "User-defined key/value metadata." 1220 type: "object" 1221 additionalProperties: 1222 type: "string" 1223 StopSignal: 1224 description: | 1225 Signal to stop a container as a string or unsigned integer. 1226 type: "string" 1227 default: "SIGTERM" 1228 StopTimeout: 1229 description: "Timeout to stop a container in seconds." 1230 type: "integer" 1231 default: 10 1232 Shell: 1233 description: | 1234 Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. 1235 type: "array" 1236 items: 1237 type: "string" 1238 1239 NetworkSettings: 1240 description: "NetworkSettings exposes the network settings in the API" 1241 type: "object" 1242 properties: 1243 Bridge: 1244 description: Name of the network'a bridge (for example, `docker0`). 1245 type: "string" 1246 example: "docker0" 1247 SandboxID: 1248 description: SandboxID uniquely represents a container's network stack. 1249 type: "string" 1250 example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3" 1251 HairpinMode: 1252 description: | 1253 Indicates if hairpin NAT should be enabled on the virtual interface. 1254 type: "boolean" 1255 example: false 1256 LinkLocalIPv6Address: 1257 description: IPv6 unicast address using the link-local prefix. 1258 type: "string" 1259 example: "fe80::42:acff:fe11:1" 1260 LinkLocalIPv6PrefixLen: 1261 description: Prefix length of the IPv6 unicast address. 1262 type: "integer" 1263 example: "64" 1264 Ports: 1265 $ref: "#/definitions/PortMap" 1266 SandboxKey: 1267 description: SandboxKey identifies the sandbox 1268 type: "string" 1269 example: "/var/run/docker/netns/8ab54b426c38" 1270 1271 # TODO is SecondaryIPAddresses actually used? 1272 SecondaryIPAddresses: 1273 description: "" 1274 type: "array" 1275 items: 1276 $ref: "#/definitions/Address" 1277 x-nullable: true 1278 1279 # TODO is SecondaryIPv6Addresses actually used? 1280 SecondaryIPv6Addresses: 1281 description: "" 1282 type: "array" 1283 items: 1284 $ref: "#/definitions/Address" 1285 x-nullable: true 1286 1287 # TODO properties below are part of DefaultNetworkSettings, which is 1288 # marked as deprecated since Docker 1.9 and to be removed in Docker v17.12 1289 EndpointID: 1290 description: | 1291 EndpointID uniquely represents a service endpoint in a Sandbox. 1292 1293 <p><br /></p> 1294 1295 > **Deprecated**: This field is only propagated when attached to the 1296 > default "bridge" network. Use the information from the "bridge" 1297 > network inside the `Networks` map instead, which contains the same 1298 > information. This field was deprecated in Docker 1.9 and is scheduled 1299 > to be removed in Docker 17.12.0 1300 type: "string" 1301 example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" 1302 Gateway: 1303 description: | 1304 Gateway address for the default "bridge" network. 1305 1306 <p><br /></p> 1307 1308 > **Deprecated**: This field is only propagated when attached to the 1309 > default "bridge" network. Use the information from the "bridge" 1310 > network inside the `Networks` map instead, which contains the same 1311 > information. This field was deprecated in Docker 1.9 and is scheduled 1312 > to be removed in Docker 17.12.0 1313 type: "string" 1314 example: "172.17.0.1" 1315 GlobalIPv6Address: 1316 description: | 1317 Global IPv6 address for the default "bridge" network. 1318 1319 <p><br /></p> 1320 1321 > **Deprecated**: This field is only propagated when attached to the 1322 > default "bridge" network. Use the information from the "bridge" 1323 > network inside the `Networks` map instead, which contains the same 1324 > information. This field was deprecated in Docker 1.9 and is scheduled 1325 > to be removed in Docker 17.12.0 1326 type: "string" 1327 example: "2001:db8::5689" 1328 GlobalIPv6PrefixLen: 1329 description: | 1330 Mask length of the global IPv6 address. 1331 1332 <p><br /></p> 1333 1334 > **Deprecated**: This field is only propagated when attached to the 1335 > default "bridge" network. Use the information from the "bridge" 1336 > network inside the `Networks` map instead, which contains the same 1337 > information. This field was deprecated in Docker 1.9 and is scheduled 1338 > to be removed in Docker 17.12.0 1339 type: "integer" 1340 example: 64 1341 IPAddress: 1342 description: | 1343 IPv4 address for the default "bridge" network. 1344 1345 <p><br /></p> 1346 1347 > **Deprecated**: This field is only propagated when attached to the 1348 > default "bridge" network. Use the information from the "bridge" 1349 > network inside the `Networks` map instead, which contains the same 1350 > information. This field was deprecated in Docker 1.9 and is scheduled 1351 > to be removed in Docker 17.12.0 1352 type: "string" 1353 example: "172.17.0.4" 1354 IPPrefixLen: 1355 description: | 1356 Mask length of the IPv4 address. 1357 1358 <p><br /></p> 1359 1360 > **Deprecated**: This field is only propagated when attached to the 1361 > default "bridge" network. Use the information from the "bridge" 1362 > network inside the `Networks` map instead, which contains the same 1363 > information. This field was deprecated in Docker 1.9 and is scheduled 1364 > to be removed in Docker 17.12.0 1365 type: "integer" 1366 example: 16 1367 IPv6Gateway: 1368 description: | 1369 IPv6 gateway address for this network. 1370 1371 <p><br /></p> 1372 1373 > **Deprecated**: This field is only propagated when attached to the 1374 > default "bridge" network. Use the information from the "bridge" 1375 > network inside the `Networks` map instead, which contains the same 1376 > information. This field was deprecated in Docker 1.9 and is scheduled 1377 > to be removed in Docker 17.12.0 1378 type: "string" 1379 example: "2001:db8:2::100" 1380 MacAddress: 1381 description: | 1382 MAC address for the container on the default "bridge" network. 1383 1384 <p><br /></p> 1385 1386 > **Deprecated**: This field is only propagated when attached to the 1387 > default "bridge" network. Use the information from the "bridge" 1388 > network inside the `Networks` map instead, which contains the same 1389 > information. This field was deprecated in Docker 1.9 and is scheduled 1390 > to be removed in Docker 17.12.0 1391 type: "string" 1392 example: "02:42:ac:11:00:04" 1393 Networks: 1394 description: | 1395 Information about all networks that the container is connected to. 1396 type: "object" 1397 additionalProperties: 1398 $ref: "#/definitions/EndpointSettings" 1399 1400 Address: 1401 description: Address represents an IPv4 or IPv6 IP address. 1402 type: "object" 1403 properties: 1404 Addr: 1405 description: IP address. 1406 type: "string" 1407 PrefixLen: 1408 description: Mask length of the IP address. 1409 type: "integer" 1410 1411 PortMap: 1412 description: | 1413 PortMap describes the mapping of container ports to host ports, using the 1414 container's port-number and protocol as key in the format `<port>/<protocol>`, 1415 for example, `80/udp`. 1416 1417 If a container's port is mapped for multiple protocols, separate entries 1418 are added to the mapping table. 1419 type: "object" 1420 additionalProperties: 1421 type: "array" 1422 x-nullable: true 1423 items: 1424 $ref: "#/definitions/PortBinding" 1425 example: 1426 "443/tcp": 1427 - HostIp: "127.0.0.1" 1428 HostPort: "4443" 1429 "80/tcp": 1430 - HostIp: "0.0.0.0" 1431 HostPort: "80" 1432 - HostIp: "0.0.0.0" 1433 HostPort: "8080" 1434 "80/udp": 1435 - HostIp: "0.0.0.0" 1436 HostPort: "80" 1437 "53/udp": 1438 - HostIp: "0.0.0.0" 1439 HostPort: "53" 1440 "2377/tcp": null 1441 1442 PortBinding: 1443 description: | 1444 PortBinding represents a binding between a host IP address and a host 1445 port. 1446 type: "object" 1447 properties: 1448 HostIp: 1449 description: "Host IP address that the container's port is mapped to." 1450 type: "string" 1451 example: "127.0.0.1" 1452 HostPort: 1453 description: "Host port number that the container's port is mapped to." 1454 type: "string" 1455 example: "4443" 1456 1457 GraphDriverData: 1458 description: "Information about a container's graph driver." 1459 type: "object" 1460 required: [Name, Data] 1461 properties: 1462 Name: 1463 type: "string" 1464 x-nullable: false 1465 Data: 1466 type: "object" 1467 x-nullable: false 1468 additionalProperties: 1469 type: "string" 1470 1471 Image: 1472 type: "object" 1473 required: 1474 - Id 1475 - Parent 1476 - Comment 1477 - Created 1478 - Container 1479 - DockerVersion 1480 - Author 1481 - Architecture 1482 - Os 1483 - Size 1484 - VirtualSize 1485 - GraphDriver 1486 - RootFS 1487 properties: 1488 Id: 1489 type: "string" 1490 x-nullable: false 1491 RepoTags: 1492 type: "array" 1493 items: 1494 type: "string" 1495 RepoDigests: 1496 type: "array" 1497 items: 1498 type: "string" 1499 Parent: 1500 type: "string" 1501 x-nullable: false 1502 Comment: 1503 type: "string" 1504 x-nullable: false 1505 Created: 1506 type: "string" 1507 x-nullable: false 1508 Container: 1509 type: "string" 1510 x-nullable: false 1511 ContainerConfig: 1512 $ref: "#/definitions/ContainerConfig" 1513 DockerVersion: 1514 type: "string" 1515 x-nullable: false 1516 Author: 1517 type: "string" 1518 x-nullable: false 1519 Config: 1520 $ref: "#/definitions/ContainerConfig" 1521 Architecture: 1522 type: "string" 1523 x-nullable: false 1524 Os: 1525 type: "string" 1526 x-nullable: false 1527 OsVersion: 1528 type: "string" 1529 Size: 1530 type: "integer" 1531 format: "int64" 1532 x-nullable: false 1533 VirtualSize: 1534 type: "integer" 1535 format: "int64" 1536 x-nullable: false 1537 GraphDriver: 1538 $ref: "#/definitions/GraphDriverData" 1539 RootFS: 1540 type: "object" 1541 required: [Type] 1542 properties: 1543 Type: 1544 type: "string" 1545 x-nullable: false 1546 Layers: 1547 type: "array" 1548 items: 1549 type: "string" 1550 BaseLayer: 1551 type: "string" 1552 Metadata: 1553 type: "object" 1554 properties: 1555 LastTagTime: 1556 type: "string" 1557 format: "dateTime" 1558 1559 ImageSummary: 1560 type: "object" 1561 required: 1562 - Id 1563 - ParentId 1564 - RepoTags 1565 - RepoDigests 1566 - Created 1567 - Size 1568 - SharedSize 1569 - VirtualSize 1570 - Labels 1571 - Containers 1572 properties: 1573 Id: 1574 type: "string" 1575 x-nullable: false 1576 ParentId: 1577 type: "string" 1578 x-nullable: false 1579 RepoTags: 1580 type: "array" 1581 x-nullable: false 1582 items: 1583 type: "string" 1584 RepoDigests: 1585 type: "array" 1586 x-nullable: false 1587 items: 1588 type: "string" 1589 Created: 1590 type: "integer" 1591 x-nullable: false 1592 Size: 1593 type: "integer" 1594 x-nullable: false 1595 SharedSize: 1596 type: "integer" 1597 x-nullable: false 1598 VirtualSize: 1599 type: "integer" 1600 x-nullable: false 1601 Labels: 1602 type: "object" 1603 x-nullable: false 1604 additionalProperties: 1605 type: "string" 1606 Containers: 1607 x-nullable: false 1608 type: "integer" 1609 1610 AuthConfig: 1611 type: "object" 1612 properties: 1613 username: 1614 type: "string" 1615 password: 1616 type: "string" 1617 email: 1618 type: "string" 1619 serveraddress: 1620 type: "string" 1621 example: 1622 username: "hannibal" 1623 password: "xxxx" 1624 serveraddress: "https://index.docker.io/v1/" 1625 1626 ProcessConfig: 1627 type: "object" 1628 properties: 1629 privileged: 1630 type: "boolean" 1631 user: 1632 type: "string" 1633 tty: 1634 type: "boolean" 1635 entrypoint: 1636 type: "string" 1637 arguments: 1638 type: "array" 1639 items: 1640 type: "string" 1641 1642 Volume: 1643 type: "object" 1644 required: [Name, Driver, Mountpoint, Labels, Scope, Options] 1645 properties: 1646 Name: 1647 type: "string" 1648 description: "Name of the volume." 1649 x-nullable: false 1650 Driver: 1651 type: "string" 1652 description: "Name of the volume driver used by the volume." 1653 x-nullable: false 1654 Mountpoint: 1655 type: "string" 1656 description: "Mount path of the volume on the host." 1657 x-nullable: false 1658 CreatedAt: 1659 type: "string" 1660 format: "dateTime" 1661 description: "Date/Time the volume was created." 1662 Status: 1663 type: "object" 1664 description: | 1665 Low-level details about the volume, provided by the volume driver. 1666 Details are returned as a map with key/value pairs: 1667 `{"key":"value","key2":"value2"}`. 1668 1669 The `Status` field is optional, and is omitted if the volume driver 1670 does not support this feature. 1671 additionalProperties: 1672 type: "object" 1673 Labels: 1674 type: "object" 1675 description: "User-defined key/value metadata." 1676 x-nullable: false 1677 additionalProperties: 1678 type: "string" 1679 Scope: 1680 type: "string" 1681 description: | 1682 The level at which the volume exists. Either `global` for cluster-wide, 1683 or `local` for machine level. 1684 default: "local" 1685 x-nullable: false 1686 enum: ["local", "global"] 1687 Options: 1688 type: "object" 1689 description: | 1690 The driver specific options used when creating the volume. 1691 additionalProperties: 1692 type: "string" 1693 UsageData: 1694 type: "object" 1695 x-nullable: true 1696 required: [Size, RefCount] 1697 description: | 1698 Usage details about the volume. This information is used by the 1699 `GET /system/df` endpoint, and omitted in other endpoints. 1700 properties: 1701 Size: 1702 type: "integer" 1703 default: -1 1704 description: | 1705 Amount of disk space used by the volume (in bytes). This information 1706 is only available for volumes created with the `"local"` volume 1707 driver. For volumes created with other volume drivers, this field 1708 is set to `-1` ("not available") 1709 x-nullable: false 1710 RefCount: 1711 type: "integer" 1712 default: -1 1713 description: | 1714 The number of containers referencing this volume. This field 1715 is set to `-1` if the reference-count is not available. 1716 x-nullable: false 1717 1718 example: 1719 Name: "tardis" 1720 Driver: "custom" 1721 Mountpoint: "/var/lib/docker/volumes/tardis" 1722 Status: 1723 hello: "world" 1724 Labels: 1725 com.example.some-label: "some-value" 1726 com.example.some-other-label: "some-other-value" 1727 Scope: "local" 1728 CreatedAt: "2016-06-07T20:31:11.853781916Z" 1729 1730 Network: 1731 type: "object" 1732 properties: 1733 Name: 1734 type: "string" 1735 Id: 1736 type: "string" 1737 Created: 1738 type: "string" 1739 format: "dateTime" 1740 Scope: 1741 type: "string" 1742 Driver: 1743 type: "string" 1744 EnableIPv6: 1745 type: "boolean" 1746 IPAM: 1747 $ref: "#/definitions/IPAM" 1748 Internal: 1749 type: "boolean" 1750 Attachable: 1751 type: "boolean" 1752 Ingress: 1753 type: "boolean" 1754 Containers: 1755 type: "object" 1756 additionalProperties: 1757 $ref: "#/definitions/NetworkContainer" 1758 Options: 1759 type: "object" 1760 additionalProperties: 1761 type: "string" 1762 Labels: 1763 type: "object" 1764 additionalProperties: 1765 type: "string" 1766 example: 1767 Name: "net01" 1768 Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" 1769 Created: "2016-10-19T04:33:30.360899459Z" 1770 Scope: "local" 1771 Driver: "bridge" 1772 EnableIPv6: false 1773 IPAM: 1774 Driver: "default" 1775 Config: 1776 - Subnet: "172.19.0.0/16" 1777 Gateway: "172.19.0.1" 1778 Options: 1779 foo: "bar" 1780 Internal: false 1781 Attachable: false 1782 Ingress: false 1783 Containers: 1784 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: 1785 Name: "test" 1786 EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" 1787 MacAddress: "02:42:ac:13:00:02" 1788 IPv4Address: "172.19.0.2/16" 1789 IPv6Address: "" 1790 Options: 1791 com.docker.network.bridge.default_bridge: "true" 1792 com.docker.network.bridge.enable_icc: "true" 1793 com.docker.network.bridge.enable_ip_masquerade: "true" 1794 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 1795 com.docker.network.bridge.name: "docker0" 1796 com.docker.network.driver.mtu: "1500" 1797 Labels: 1798 com.example.some-label: "some-value" 1799 com.example.some-other-label: "some-other-value" 1800 IPAM: 1801 type: "object" 1802 properties: 1803 Driver: 1804 description: "Name of the IPAM driver to use." 1805 type: "string" 1806 default: "default" 1807 Config: 1808 description: | 1809 List of IPAM configuration options, specified as a map: 1810 1811 ``` 1812 {"Subnet": <CIDR>, "IPRange": <CIDR>, "Gateway": <IP address>, "AuxAddress": <device_name:IP address>} 1813 ``` 1814 type: "array" 1815 items: 1816 type: "object" 1817 additionalProperties: 1818 type: "string" 1819 Options: 1820 description: "Driver-specific options, specified as a map." 1821 type: "object" 1822 additionalProperties: 1823 type: "string" 1824 1825 NetworkContainer: 1826 type: "object" 1827 properties: 1828 Name: 1829 type: "string" 1830 EndpointID: 1831 type: "string" 1832 MacAddress: 1833 type: "string" 1834 IPv4Address: 1835 type: "string" 1836 IPv6Address: 1837 type: "string" 1838 1839 BuildInfo: 1840 type: "object" 1841 properties: 1842 id: 1843 type: "string" 1844 stream: 1845 type: "string" 1846 error: 1847 type: "string" 1848 errorDetail: 1849 $ref: "#/definitions/ErrorDetail" 1850 status: 1851 type: "string" 1852 progress: 1853 type: "string" 1854 progressDetail: 1855 $ref: "#/definitions/ProgressDetail" 1856 aux: 1857 $ref: "#/definitions/ImageID" 1858 1859 BuildCache: 1860 type: "object" 1861 properties: 1862 ID: 1863 type: "string" 1864 Parent: 1865 type: "string" 1866 Type: 1867 type: "string" 1868 Description: 1869 type: "string" 1870 InUse: 1871 type: "boolean" 1872 Shared: 1873 type: "boolean" 1874 Size: 1875 type: "integer" 1876 CreatedAt: 1877 type: "integer" 1878 LastUsedAt: 1879 type: "integer" 1880 x-nullable: true 1881 UsageCount: 1882 type: "integer" 1883 1884 ImageID: 1885 type: "object" 1886 description: "Image ID or Digest" 1887 properties: 1888 ID: 1889 type: "string" 1890 example: 1891 ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" 1892 1893 CreateImageInfo: 1894 type: "object" 1895 properties: 1896 id: 1897 type: "string" 1898 error: 1899 type: "string" 1900 status: 1901 type: "string" 1902 progress: 1903 type: "string" 1904 progressDetail: 1905 $ref: "#/definitions/ProgressDetail" 1906 1907 PushImageInfo: 1908 type: "object" 1909 properties: 1910 error: 1911 type: "string" 1912 status: 1913 type: "string" 1914 progress: 1915 type: "string" 1916 progressDetail: 1917 $ref: "#/definitions/ProgressDetail" 1918 1919 ErrorDetail: 1920 type: "object" 1921 properties: 1922 code: 1923 type: "integer" 1924 message: 1925 type: "string" 1926 1927 ProgressDetail: 1928 type: "object" 1929 properties: 1930 current: 1931 type: "integer" 1932 total: 1933 type: "integer" 1934 1935 ErrorResponse: 1936 description: "Represents an error." 1937 type: "object" 1938 required: ["message"] 1939 properties: 1940 message: 1941 description: "The error message." 1942 type: "string" 1943 x-nullable: false 1944 example: 1945 message: "Something went wrong." 1946 1947 IdResponse: 1948 description: "Response to an API call that returns just an Id" 1949 type: "object" 1950 required: ["Id"] 1951 properties: 1952 Id: 1953 description: "The id of the newly created object." 1954 type: "string" 1955 x-nullable: false 1956 1957 EndpointSettings: 1958 description: "Configuration for a network endpoint." 1959 type: "object" 1960 properties: 1961 # Configurations 1962 IPAMConfig: 1963 $ref: "#/definitions/EndpointIPAMConfig" 1964 Links: 1965 type: "array" 1966 items: 1967 type: "string" 1968 example: 1969 - "container_1" 1970 - "container_2" 1971 Aliases: 1972 type: "array" 1973 items: 1974 type: "string" 1975 example: 1976 - "server_x" 1977 - "server_y" 1978 1979 # Operational data 1980 NetworkID: 1981 description: | 1982 Unique ID of the network. 1983 type: "string" 1984 example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a" 1985 EndpointID: 1986 description: | 1987 Unique ID for the service endpoint in a Sandbox. 1988 type: "string" 1989 example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" 1990 Gateway: 1991 description: | 1992 Gateway address for this network. 1993 type: "string" 1994 example: "172.17.0.1" 1995 IPAddress: 1996 description: | 1997 IPv4 address. 1998 type: "string" 1999 example: "172.17.0.4" 2000 IPPrefixLen: 2001 description: | 2002 Mask length of the IPv4 address. 2003 type: "integer" 2004 example: 16 2005 IPv6Gateway: 2006 description: | 2007 IPv6 gateway address. 2008 type: "string" 2009 example: "2001:db8:2::100" 2010 GlobalIPv6Address: 2011 description: | 2012 Global IPv6 address. 2013 type: "string" 2014 example: "2001:db8::5689" 2015 GlobalIPv6PrefixLen: 2016 description: | 2017 Mask length of the global IPv6 address. 2018 type: "integer" 2019 format: "int64" 2020 example: 64 2021 MacAddress: 2022 description: | 2023 MAC address for the endpoint on this network. 2024 type: "string" 2025 example: "02:42:ac:11:00:04" 2026 DriverOpts: 2027 description: | 2028 DriverOpts is a mapping of driver options and values. These options 2029 are passed directly to the driver and are driver specific. 2030 type: "object" 2031 x-nullable: true 2032 additionalProperties: 2033 type: "string" 2034 example: 2035 com.example.some-label: "some-value" 2036 com.example.some-other-label: "some-other-value" 2037 2038 EndpointIPAMConfig: 2039 description: | 2040 EndpointIPAMConfig represents an endpoint's IPAM configuration. 2041 type: "object" 2042 x-nullable: true 2043 properties: 2044 IPv4Address: 2045 type: "string" 2046 example: "172.20.30.33" 2047 IPv6Address: 2048 type: "string" 2049 example: "2001:db8:abcd::3033" 2050 LinkLocalIPs: 2051 type: "array" 2052 items: 2053 type: "string" 2054 example: 2055 - "169.254.34.68" 2056 - "fe80::3468" 2057 2058 PluginMount: 2059 type: "object" 2060 x-nullable: false 2061 required: [Name, Description, Settable, Source, Destination, Type, Options] 2062 properties: 2063 Name: 2064 type: "string" 2065 x-nullable: false 2066 example: "some-mount" 2067 Description: 2068 type: "string" 2069 x-nullable: false 2070 example: "This is a mount that's used by the plugin." 2071 Settable: 2072 type: "array" 2073 items: 2074 type: "string" 2075 Source: 2076 type: "string" 2077 example: "/var/lib/docker/plugins/" 2078 Destination: 2079 type: "string" 2080 x-nullable: false 2081 example: "/mnt/state" 2082 Type: 2083 type: "string" 2084 x-nullable: false 2085 example: "bind" 2086 Options: 2087 type: "array" 2088 items: 2089 type: "string" 2090 example: 2091 - "rbind" 2092 - "rw" 2093 2094 PluginDevice: 2095 type: "object" 2096 required: [Name, Description, Settable, Path] 2097 x-nullable: false 2098 properties: 2099 Name: 2100 type: "string" 2101 x-nullable: false 2102 Description: 2103 type: "string" 2104 x-nullable: false 2105 Settable: 2106 type: "array" 2107 items: 2108 type: "string" 2109 Path: 2110 type: "string" 2111 example: "/dev/fuse" 2112 2113 PluginEnv: 2114 type: "object" 2115 x-nullable: false 2116 required: [Name, Description, Settable, Value] 2117 properties: 2118 Name: 2119 x-nullable: false 2120 type: "string" 2121 Description: 2122 x-nullable: false 2123 type: "string" 2124 Settable: 2125 type: "array" 2126 items: 2127 type: "string" 2128 Value: 2129 type: "string" 2130 2131 PluginInterfaceType: 2132 type: "object" 2133 x-nullable: false 2134 required: [Prefix, Capability, Version] 2135 properties: 2136 Prefix: 2137 type: "string" 2138 x-nullable: false 2139 Capability: 2140 type: "string" 2141 x-nullable: false 2142 Version: 2143 type: "string" 2144 x-nullable: false 2145 2146 Plugin: 2147 description: "A plugin for the Engine API" 2148 type: "object" 2149 required: [Settings, Enabled, Config, Name] 2150 properties: 2151 Id: 2152 type: "string" 2153 example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" 2154 Name: 2155 type: "string" 2156 x-nullable: false 2157 example: "tiborvass/sample-volume-plugin" 2158 Enabled: 2159 description: 2160 True if the plugin is running. False if the plugin is not running, 2161 only installed. 2162 type: "boolean" 2163 x-nullable: false 2164 example: true 2165 Settings: 2166 description: "Settings that can be modified by users." 2167 type: "object" 2168 x-nullable: false 2169 required: [Args, Devices, Env, Mounts] 2170 properties: 2171 Mounts: 2172 type: "array" 2173 items: 2174 $ref: "#/definitions/PluginMount" 2175 Env: 2176 type: "array" 2177 items: 2178 type: "string" 2179 example: 2180 - "DEBUG=0" 2181 Args: 2182 type: "array" 2183 items: 2184 type: "string" 2185 Devices: 2186 type: "array" 2187 items: 2188 $ref: "#/definitions/PluginDevice" 2189 PluginReference: 2190 description: "plugin remote reference used to push/pull the plugin" 2191 type: "string" 2192 x-nullable: false 2193 example: "localhost:5000/tiborvass/sample-volume-plugin:latest" 2194 Config: 2195 description: "The config of a plugin." 2196 type: "object" 2197 x-nullable: false 2198 required: 2199 - Description 2200 - Documentation 2201 - Interface 2202 - Entrypoint 2203 - WorkDir 2204 - Network 2205 - Linux 2206 - PidHost 2207 - PropagatedMount 2208 - IpcHost 2209 - Mounts 2210 - Env 2211 - Args 2212 properties: 2213 DockerVersion: 2214 description: "Docker Version used to create the plugin" 2215 type: "string" 2216 x-nullable: false 2217 example: "17.06.0-ce" 2218 Description: 2219 type: "string" 2220 x-nullable: false 2221 example: "A sample volume plugin for Docker" 2222 Documentation: 2223 type: "string" 2224 x-nullable: false 2225 example: "https://docs.docker.com/engine/extend/plugins/" 2226 Interface: 2227 description: "The interface between Docker and the plugin" 2228 x-nullable: false 2229 type: "object" 2230 required: [Types, Socket] 2231 properties: 2232 Types: 2233 type: "array" 2234 items: 2235 $ref: "#/definitions/PluginInterfaceType" 2236 example: 2237 - "docker.volumedriver/1.0" 2238 Socket: 2239 type: "string" 2240 x-nullable: false 2241 example: "plugins.sock" 2242 ProtocolScheme: 2243 type: "string" 2244 example: "some.protocol/v1.0" 2245 description: "Protocol to use for clients connecting to the plugin." 2246 enum: 2247 - "" 2248 - "moby.plugins.http/v1" 2249 Entrypoint: 2250 type: "array" 2251 items: 2252 type: "string" 2253 example: 2254 - "/usr/bin/sample-volume-plugin" 2255 - "/data" 2256 WorkDir: 2257 type: "string" 2258 x-nullable: false 2259 example: "/bin/" 2260 User: 2261 type: "object" 2262 x-nullable: false 2263 properties: 2264 UID: 2265 type: "integer" 2266 format: "uint32" 2267 example: 1000 2268 GID: 2269 type: "integer" 2270 format: "uint32" 2271 example: 1000 2272 Network: 2273 type: "object" 2274 x-nullable: false 2275 required: [Type] 2276 properties: 2277 Type: 2278 x-nullable: false 2279 type: "string" 2280 example: "host" 2281 Linux: 2282 type: "object" 2283 x-nullable: false 2284 required: [Capabilities, AllowAllDevices, Devices] 2285 properties: 2286 Capabilities: 2287 type: "array" 2288 items: 2289 type: "string" 2290 example: 2291 - "CAP_SYS_ADMIN" 2292 - "CAP_SYSLOG" 2293 AllowAllDevices: 2294 type: "boolean" 2295 x-nullable: false 2296 example: false 2297 Devices: 2298 type: "array" 2299 items: 2300 $ref: "#/definitions/PluginDevice" 2301 PropagatedMount: 2302 type: "string" 2303 x-nullable: false 2304 example: "/mnt/volumes" 2305 IpcHost: 2306 type: "boolean" 2307 x-nullable: false 2308 example: false 2309 PidHost: 2310 type: "boolean" 2311 x-nullable: false 2312 example: false 2313 Mounts: 2314 type: "array" 2315 items: 2316 $ref: "#/definitions/PluginMount" 2317 Env: 2318 type: "array" 2319 items: 2320 $ref: "#/definitions/PluginEnv" 2321 example: 2322 - Name: "DEBUG" 2323 Description: "If set, prints debug messages" 2324 Settable: null 2325 Value: "0" 2326 Args: 2327 type: "object" 2328 x-nullable: false 2329 required: [Name, Description, Settable, Value] 2330 properties: 2331 Name: 2332 x-nullable: false 2333 type: "string" 2334 example: "args" 2335 Description: 2336 x-nullable: false 2337 type: "string" 2338 example: "command line arguments" 2339 Settable: 2340 type: "array" 2341 items: 2342 type: "string" 2343 Value: 2344 type: "array" 2345 items: 2346 type: "string" 2347 rootfs: 2348 type: "object" 2349 properties: 2350 type: 2351 type: "string" 2352 example: "layers" 2353 diff_ids: 2354 type: "array" 2355 items: 2356 type: "string" 2357 example: 2358 - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887" 2359 - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" 2360 2361 ObjectVersion: 2362 description: | 2363 The version number of the object such as node, service, etc. This is needed 2364 to avoid conflicting writes. The client must send the version number along 2365 with the modified specification when updating these objects. 2366 2367 This approach ensures safe concurrency and determinism in that the change 2368 on the object may not be applied if the version number has changed from the 2369 last read. In other words, if two update requests specify the same base 2370 version, only one of the requests can succeed. As a result, two separate 2371 update requests that happen at the same time will not unintentionally 2372 overwrite each other. 2373 type: "object" 2374 properties: 2375 Index: 2376 type: "integer" 2377 format: "uint64" 2378 example: 373531 2379 2380 NodeSpec: 2381 type: "object" 2382 properties: 2383 Name: 2384 description: "Name for the node." 2385 type: "string" 2386 example: "my-node" 2387 Labels: 2388 description: "User-defined key/value metadata." 2389 type: "object" 2390 additionalProperties: 2391 type: "string" 2392 Role: 2393 description: "Role of the node." 2394 type: "string" 2395 enum: 2396 - "worker" 2397 - "manager" 2398 example: "manager" 2399 Availability: 2400 description: "Availability of the node." 2401 type: "string" 2402 enum: 2403 - "active" 2404 - "pause" 2405 - "drain" 2406 example: "active" 2407 example: 2408 Availability: "active" 2409 Name: "node-name" 2410 Role: "manager" 2411 Labels: 2412 foo: "bar" 2413 2414 Node: 2415 type: "object" 2416 properties: 2417 ID: 2418 type: "string" 2419 example: "24ifsmvkjbyhk" 2420 Version: 2421 $ref: "#/definitions/ObjectVersion" 2422 CreatedAt: 2423 description: | 2424 Date and time at which the node was added to the swarm in 2425 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 2426 type: "string" 2427 format: "dateTime" 2428 example: "2016-08-18T10:44:24.496525531Z" 2429 UpdatedAt: 2430 description: | 2431 Date and time at which the node was last updated in 2432 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 2433 type: "string" 2434 format: "dateTime" 2435 example: "2017-08-09T07:09:37.632105588Z" 2436 Spec: 2437 $ref: "#/definitions/NodeSpec" 2438 Description: 2439 $ref: "#/definitions/NodeDescription" 2440 Status: 2441 $ref: "#/definitions/NodeStatus" 2442 ManagerStatus: 2443 $ref: "#/definitions/ManagerStatus" 2444 2445 NodeDescription: 2446 description: | 2447 NodeDescription encapsulates the properties of the Node as reported by the 2448 agent. 2449 type: "object" 2450 properties: 2451 Hostname: 2452 type: "string" 2453 example: "bf3067039e47" 2454 Platform: 2455 $ref: "#/definitions/Platform" 2456 Resources: 2457 $ref: "#/definitions/ResourceObject" 2458 Engine: 2459 $ref: "#/definitions/EngineDescription" 2460 TLSInfo: 2461 $ref: "#/definitions/TLSInfo" 2462 2463 Platform: 2464 description: | 2465 Platform represents the platform (Arch/OS). 2466 type: "object" 2467 properties: 2468 Architecture: 2469 description: | 2470 Architecture represents the hardware architecture (for example, 2471 `x86_64`). 2472 type: "string" 2473 example: "x86_64" 2474 OS: 2475 description: | 2476 OS represents the Operating System (for example, `linux` or `windows`). 2477 type: "string" 2478 example: "linux" 2479 2480 EngineDescription: 2481 description: "EngineDescription provides information about an engine." 2482 type: "object" 2483 properties: 2484 EngineVersion: 2485 type: "string" 2486 example: "17.06.0" 2487 Labels: 2488 type: "object" 2489 additionalProperties: 2490 type: "string" 2491 example: 2492 foo: "bar" 2493 Plugins: 2494 type: "array" 2495 items: 2496 type: "object" 2497 properties: 2498 Type: 2499 type: "string" 2500 Name: 2501 type: "string" 2502 example: 2503 - Type: "Log" 2504 Name: "awslogs" 2505 - Type: "Log" 2506 Name: "fluentd" 2507 - Type: "Log" 2508 Name: "gcplogs" 2509 - Type: "Log" 2510 Name: "gelf" 2511 - Type: "Log" 2512 Name: "journald" 2513 - Type: "Log" 2514 Name: "json-file" 2515 - Type: "Log" 2516 Name: "logentries" 2517 - Type: "Log" 2518 Name: "splunk" 2519 - Type: "Log" 2520 Name: "syslog" 2521 - Type: "Network" 2522 Name: "bridge" 2523 - Type: "Network" 2524 Name: "host" 2525 - Type: "Network" 2526 Name: "ipvlan" 2527 - Type: "Network" 2528 Name: "macvlan" 2529 - Type: "Network" 2530 Name: "null" 2531 - Type: "Network" 2532 Name: "overlay" 2533 - Type: "Volume" 2534 Name: "local" 2535 - Type: "Volume" 2536 Name: "localhost:5000/vieux/sshfs:latest" 2537 - Type: "Volume" 2538 Name: "vieux/sshfs:latest" 2539 2540 TLSInfo: 2541 description: | 2542 Information about the issuer of leaf TLS certificates and the trusted root 2543 CA certificate. 2544 type: "object" 2545 properties: 2546 TrustRoot: 2547 description: | 2548 The root CA certificate(s) that are used to validate leaf TLS 2549 certificates. 2550 type: "string" 2551 CertIssuerSubject: 2552 description: 2553 The base64-url-safe-encoded raw subject bytes of the issuer. 2554 type: "string" 2555 CertIssuerPublicKey: 2556 description: | 2557 The base64-url-safe-encoded raw public key bytes of the issuer. 2558 type: "string" 2559 example: 2560 TrustRoot: | 2561 -----BEGIN CERTIFICATE----- 2562 MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw 2563 EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 2564 MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH 2565 A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf 2566 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB 2567 Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO 2568 PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz 2569 pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H 2570 -----END CERTIFICATE----- 2571 CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" 2572 CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" 2573 2574 NodeStatus: 2575 description: | 2576 NodeStatus represents the status of a node. 2577 2578 It provides the current status of the node, as seen by the manager. 2579 type: "object" 2580 properties: 2581 State: 2582 $ref: "#/definitions/NodeState" 2583 Message: 2584 type: "string" 2585 example: "" 2586 Addr: 2587 description: "IP address of the node." 2588 type: "string" 2589 example: "172.17.0.2" 2590 2591 NodeState: 2592 description: "NodeState represents the state of a node." 2593 type: "string" 2594 enum: 2595 - "unknown" 2596 - "down" 2597 - "ready" 2598 - "disconnected" 2599 example: "ready" 2600 2601 ManagerStatus: 2602 description: | 2603 ManagerStatus represents the status of a manager. 2604 2605 It provides the current status of a node's manager component, if the node 2606 is a manager. 2607 x-nullable: true 2608 type: "object" 2609 properties: 2610 Leader: 2611 type: "boolean" 2612 default: false 2613 example: true 2614 Reachability: 2615 $ref: "#/definitions/Reachability" 2616 Addr: 2617 description: | 2618 The IP address and port at which the manager is reachable. 2619 type: "string" 2620 example: "10.0.0.46:2377" 2621 2622 Reachability: 2623 description: "Reachability represents the reachability of a node." 2624 type: "string" 2625 enum: 2626 - "unknown" 2627 - "unreachable" 2628 - "reachable" 2629 example: "reachable" 2630 2631 SwarmSpec: 2632 description: "User modifiable swarm configuration." 2633 type: "object" 2634 properties: 2635 Name: 2636 description: "Name of the swarm." 2637 type: "string" 2638 example: "default" 2639 Labels: 2640 description: "User-defined key/value metadata." 2641 type: "object" 2642 additionalProperties: 2643 type: "string" 2644 example: 2645 com.example.corp.type: "production" 2646 com.example.corp.department: "engineering" 2647 Orchestration: 2648 description: "Orchestration configuration." 2649 type: "object" 2650 x-nullable: true 2651 properties: 2652 TaskHistoryRetentionLimit: 2653 description: | 2654 The number of historic tasks to keep per instance or node. If 2655 negative, never remove completed or failed tasks. 2656 type: "integer" 2657 format: "int64" 2658 example: 10 2659 Raft: 2660 description: "Raft configuration." 2661 type: "object" 2662 properties: 2663 SnapshotInterval: 2664 description: "The number of log entries between snapshots." 2665 type: "integer" 2666 format: "uint64" 2667 example: 10000 2668 KeepOldSnapshots: 2669 description: | 2670 The number of snapshots to keep beyond the current snapshot. 2671 type: "integer" 2672 format: "uint64" 2673 LogEntriesForSlowFollowers: 2674 description: | 2675 The number of log entries to keep around to sync up slow followers 2676 after a snapshot is created. 2677 type: "integer" 2678 format: "uint64" 2679 example: 500 2680 ElectionTick: 2681 description: | 2682 The number of ticks that a follower will wait for a message from 2683 the leader before becoming a candidate and starting an election. 2684 `ElectionTick` must be greater than `HeartbeatTick`. 2685 2686 A tick currently defaults to one second, so these translate 2687 directly to seconds currently, but this is NOT guaranteed. 2688 type: "integer" 2689 example: 3 2690 HeartbeatTick: 2691 description: | 2692 The number of ticks between heartbeats. Every HeartbeatTick ticks, 2693 the leader will send a heartbeat to the followers. 2694 2695 A tick currently defaults to one second, so these translate 2696 directly to seconds currently, but this is NOT guaranteed. 2697 type: "integer" 2698 example: 1 2699 Dispatcher: 2700 description: "Dispatcher configuration." 2701 type: "object" 2702 x-nullable: true 2703 properties: 2704 HeartbeatPeriod: 2705 description: | 2706 The delay for an agent to send a heartbeat to the dispatcher. 2707 type: "integer" 2708 format: "int64" 2709 example: 5000000000 2710 CAConfig: 2711 description: "CA configuration." 2712 type: "object" 2713 x-nullable: true 2714 properties: 2715 NodeCertExpiry: 2716 description: "The duration node certificates are issued for." 2717 type: "integer" 2718 format: "int64" 2719 example: 7776000000000000 2720 ExternalCAs: 2721 description: | 2722 Configuration for forwarding signing requests to an external 2723 certificate authority. 2724 type: "array" 2725 items: 2726 type: "object" 2727 properties: 2728 Protocol: 2729 description: | 2730 Protocol for communication with the external CA (currently 2731 only `cfssl` is supported). 2732 type: "string" 2733 enum: 2734 - "cfssl" 2735 default: "cfssl" 2736 URL: 2737 description: | 2738 URL where certificate signing requests should be sent. 2739 type: "string" 2740 Options: 2741 description: | 2742 An object with key/value pairs that are interpreted as 2743 protocol-specific options for the external CA driver. 2744 type: "object" 2745 additionalProperties: 2746 type: "string" 2747 CACert: 2748 description: | 2749 The root CA certificate (in PEM format) this external CA uses 2750 to issue TLS certificates (assumed to be to the current swarm 2751 root CA certificate if not provided). 2752 type: "string" 2753 SigningCACert: 2754 description: | 2755 The desired signing CA certificate for all swarm node TLS leaf 2756 certificates, in PEM format. 2757 type: "string" 2758 SigningCAKey: 2759 description: | 2760 The desired signing CA key for all swarm node TLS leaf certificates, 2761 in PEM format. 2762 type: "string" 2763 ForceRotate: 2764 description: | 2765 An integer whose purpose is to force swarm to generate a new 2766 signing CA certificate and key, if none have been specified in 2767 `SigningCACert` and `SigningCAKey` 2768 format: "uint64" 2769 type: "integer" 2770 EncryptionConfig: 2771 description: "Parameters related to encryption-at-rest." 2772 type: "object" 2773 properties: 2774 AutoLockManagers: 2775 description: | 2776 If set, generate a key and use it to lock data stored on the 2777 managers. 2778 type: "boolean" 2779 example: false 2780 TaskDefaults: 2781 description: "Defaults for creating tasks in this cluster." 2782 type: "object" 2783 properties: 2784 LogDriver: 2785 description: | 2786 The log driver to use for tasks created in the orchestrator if 2787 unspecified by a service. 2788 2789 Updating this value only affects new tasks. Existing tasks continue 2790 to use their previously configured log driver until recreated. 2791 type: "object" 2792 properties: 2793 Name: 2794 description: | 2795 The log driver to use as a default for new tasks. 2796 type: "string" 2797 example: "json-file" 2798 Options: 2799 description: | 2800 Driver-specific options for the selectd log driver, specified 2801 as key/value pairs. 2802 type: "object" 2803 additionalProperties: 2804 type: "string" 2805 example: 2806 "max-file": "10" 2807 "max-size": "100m" 2808 2809 # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but 2810 # without `JoinTokens`. 2811 ClusterInfo: 2812 description: | 2813 ClusterInfo represents information about the swarm as is returned by the 2814 "/info" endpoint. Join-tokens are not included. 2815 x-nullable: true 2816 type: "object" 2817 properties: 2818 ID: 2819 description: "The ID of the swarm." 2820 type: "string" 2821 example: "abajmipo7b4xz5ip2nrla6b11" 2822 Version: 2823 $ref: "#/definitions/ObjectVersion" 2824 CreatedAt: 2825 description: | 2826 Date and time at which the swarm was initialised in 2827 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 2828 type: "string" 2829 format: "dateTime" 2830 example: "2016-08-18T10:44:24.496525531Z" 2831 UpdatedAt: 2832 description: | 2833 Date and time at which the swarm was last updated in 2834 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. 2835 type: "string" 2836 format: "dateTime" 2837 example: "2017-08-09T07:09:37.632105588Z" 2838 Spec: 2839 $ref: "#/definitions/SwarmSpec" 2840 TLSInfo: 2841 $ref: "#/definitions/TLSInfo" 2842 RootRotationInProgress: 2843 description: | 2844 Whether there is currently a root CA rotation in progress for the swarm 2845 type: "boolean" 2846 example: false 2847 DataPathPort: 2848 description: | 2849 DataPathPort specifies the data path port number for data traffic. 2850 Acceptable port range is 1024 to 49151. 2851 If no port is set or is set to 0, the default port (4789) is used. 2852 type: "integer" 2853 format: "uint32" 2854 default: 4789 2855 example: 4789 2856 DefaultAddrPool: 2857 description: | 2858 Default Address Pool specifies default subnet pools for global scope 2859 networks. 2860 type: "array" 2861 items: 2862 type: "string" 2863 format: "CIDR" 2864 example: ["10.10.0.0/16", "20.20.0.0/16"] 2865 SubnetSize: 2866 description: | 2867 SubnetSize specifies the subnet size of the networks created from the 2868 default subnet pool. 2869 type: "integer" 2870 format: "uint32" 2871 maximum: 29 2872 default: 24 2873 example: 24 2874 2875 JoinTokens: 2876 description: | 2877 JoinTokens contains the tokens workers and managers need to join the swarm. 2878 type: "object" 2879 properties: 2880 Worker: 2881 description: | 2882 The token workers can use to join the swarm. 2883 type: "string" 2884 example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" 2885 Manager: 2886 description: | 2887 The token managers can use to join the swarm. 2888 type: "string" 2889 example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 2890 2891 Swarm: 2892 type: "object" 2893 allOf: 2894 - $ref: "#/definitions/ClusterInfo" 2895 - type: "object" 2896 properties: 2897 JoinTokens: 2898 $ref: "#/definitions/JoinTokens" 2899 2900 TaskSpec: 2901 description: "User modifiable task configuration." 2902 type: "object" 2903 properties: 2904 PluginSpec: 2905 type: "object" 2906 description: | 2907 Plugin spec for the service. *(Experimental release only.)* 2908 2909 <p><br /></p> 2910 2911 > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are 2912 > mutually exclusive. PluginSpec is only used when the Runtime field 2913 > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime 2914 > field is set to `attachment`. 2915 properties: 2916 Name: 2917 description: "The name or 'alias' to use for the plugin." 2918 type: "string" 2919 Remote: 2920 description: "The plugin image reference to use." 2921 type: "string" 2922 Disabled: 2923 description: "Disable the plugin once scheduled." 2924 type: "boolean" 2925 PluginPrivilege: 2926 type: "array" 2927 items: 2928 description: | 2929 Describes a permission accepted by the user upon installing the 2930 plugin. 2931 type: "object" 2932 properties: 2933 Name: 2934 type: "string" 2935 Description: 2936 type: "string" 2937 Value: 2938 type: "array" 2939 items: 2940 type: "string" 2941 ContainerSpec: 2942 type: "object" 2943 description: | 2944 Container spec for the service. 2945 2946 <p><br /></p> 2947 2948 > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are 2949 > mutually exclusive. PluginSpec is only used when the Runtime field 2950 > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime 2951 > field is set to `attachment`. 2952 properties: 2953 Image: 2954 description: "The image name to use for the container" 2955 type: "string" 2956 Labels: 2957 description: "User-defined key/value data." 2958 type: "object" 2959 additionalProperties: 2960 type: "string" 2961 Command: 2962 description: "The command to be run in the image." 2963 type: "array" 2964 items: 2965 type: "string" 2966 Args: 2967 description: "Arguments to the command." 2968 type: "array" 2969 items: 2970 type: "string" 2971 Hostname: 2972 description: | 2973 The hostname to use for the container, as a valid 2974 [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. 2975 type: "string" 2976 Env: 2977 description: | 2978 A list of environment variables in the form `VAR=value`. 2979 type: "array" 2980 items: 2981 type: "string" 2982 Dir: 2983 description: "The working directory for commands to run in." 2984 type: "string" 2985 User: 2986 description: "The user inside the container." 2987 type: "string" 2988 Groups: 2989 type: "array" 2990 description: | 2991 A list of additional groups that the container process will run as. 2992 items: 2993 type: "string" 2994 Privileges: 2995 type: "object" 2996 description: "Security options for the container" 2997 properties: 2998 CredentialSpec: 2999 type: "object" 3000 description: "CredentialSpec for managed service account (Windows only)" 3001 properties: 3002 Config: 3003 type: "string" 3004 example: "0bt9dmxjvjiqermk6xrop3ekq" 3005 description: | 3006 Load credential spec from a Swarm Config with the given ID. 3007 The specified config must also be present in the Configs 3008 field with the Runtime property set. 3009 3010 <p><br /></p> 3011 3012 3013 > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, 3014 > and `CredentialSpec.Config` are mutually exclusive. 3015 File: 3016 type: "string" 3017 example: "spec.json" 3018 description: | 3019 Load credential spec from this file. The file is read by 3020 the daemon, and must be present in the `CredentialSpecs` 3021 subdirectory in the docker data directory, which defaults 3022 to `C:\ProgramData\Docker\` on Windows. 3023 3024 For example, specifying `spec.json` loads 3025 `C:\ProgramData\Docker\CredentialSpecs\spec.json`. 3026 3027 <p><br /></p> 3028 3029 > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, 3030 > and `CredentialSpec.Config` are mutually exclusive. 3031 Registry: 3032 type: "string" 3033 description: | 3034 Load credential spec from this value in the Windows 3035 registry. The specified registry value must be located in: 3036 3037 `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` 3038 3039 <p><br /></p> 3040 3041 3042 > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, 3043 > and `CredentialSpec.Config` are mutually exclusive. 3044 SELinuxContext: 3045 type: "object" 3046 description: "SELinux labels of the container" 3047 properties: 3048 Disable: 3049 type: "boolean" 3050 description: "Disable SELinux" 3051 User: 3052 type: "string" 3053 description: "SELinux user label" 3054 Role: 3055 type: "string" 3056 description: "SELinux role label" 3057 Type: 3058 type: "string" 3059 description: "SELinux type label" 3060 Level: 3061 type: "string" 3062 description: "SELinux level label" 3063 TTY: 3064 description: "Whether a pseudo-TTY should be allocated." 3065 type: "boolean" 3066 OpenStdin: 3067 description: "Open `stdin`" 3068 type: "boolean" 3069 ReadOnly: 3070 description: "Mount the container's root filesystem as read only." 3071 type: "boolean" 3072 Mounts: 3073 description: | 3074 Specification for mounts to be added to containers created as part 3075 of the service. 3076 type: "array" 3077 items: 3078 $ref: "#/definitions/Mount" 3079 StopSignal: 3080 description: "Signal to stop the container." 3081 type: "string" 3082 StopGracePeriod: 3083 description: | 3084 Amount of time to wait for the container to terminate before 3085 forcefully killing it. 3086 type: "integer" 3087 format: "int64" 3088 HealthCheck: 3089 $ref: "#/definitions/HealthConfig" 3090 Hosts: 3091 type: "array" 3092 description: | 3093 A list of hostname/IP mappings to add to the container's `hosts` 3094 file. The format of extra hosts is specified in the 3095 [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) 3096 man page: 3097 3098 IP_address canonical_hostname [aliases...] 3099 items: 3100 type: "string" 3101 DNSConfig: 3102 description: | 3103 Specification for DNS related configurations in resolver configuration 3104 file (`resolv.conf`). 3105 type: "object" 3106 properties: 3107 Nameservers: 3108 description: "The IP addresses of the name servers." 3109 type: "array" 3110 items: 3111 type: "string" 3112 Search: 3113 description: "A search list for host-name lookup." 3114 type: "array" 3115 items: 3116 type: "string" 3117 Options: 3118 description: | 3119 A list of internal resolver variables to be modified (e.g., 3120 `debug`, `ndots:3`, etc.). 3121 type: "array" 3122 items: 3123 type: "string" 3124 Secrets: 3125 description: | 3126 Secrets contains references to zero or more secrets that will be 3127 exposed to the service. 3128 type: "array" 3129 items: 3130 type: "object" 3131 properties: 3132 File: 3133 description: | 3134 File represents a specific target that is backed by a file. 3135 type: "object" 3136 properties: 3137 Name: 3138 description: | 3139 Name represents the final filename in the filesystem. 3140 type: "string" 3141 UID: 3142 description: "UID represents the file UID." 3143 type: "string" 3144 GID: 3145 description: "GID represents the file GID." 3146 type: "string" 3147 Mode: 3148 description: "Mode represents the FileMode of the file." 3149 type: "integer" 3150 format: "uint32" 3151 SecretID: 3152 description: | 3153 SecretID represents the ID of the specific secret that we're 3154 referencing. 3155 type: "string" 3156 SecretName: 3157 description: | 3158 SecretName is the name of the secret that this references, 3159 but this is just provided for lookup/display purposes. The 3160 secret in the reference will be identified by its ID. 3161 type: "string" 3162 Configs: 3163 description: | 3164 Configs contains references to zero or more configs that will be 3165 exposed to the service. 3166 type: "array" 3167 items: 3168 type: "object" 3169 properties: 3170 File: 3171 description: | 3172 File represents a specific target that is backed by a file. 3173 3174 <p><br /><p> 3175 3176 > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive 3177 type: "object" 3178 properties: 3179 Name: 3180 description: | 3181 Name represents the final filename in the filesystem. 3182 type: "string" 3183 UID: 3184 description: "UID represents the file UID." 3185 type: "string" 3186 GID: 3187 description: "GID represents the file GID." 3188 type: "string" 3189 Mode: 3190 description: "Mode represents the FileMode of the file." 3191 type: "integer" 3192 format: "uint32" 3193 Runtime: 3194 description: | 3195 Runtime represents a target that is not mounted into the 3196 container but is used by the task 3197 3198 <p><br /><p> 3199 3200 > **Note**: `Configs.File` and `Configs.Runtime` are mutually 3201 > exclusive 3202 type: "object" 3203 ConfigID: 3204 description: | 3205 ConfigID represents the ID of the specific config that we're 3206 referencing. 3207 type: "string" 3208 ConfigName: 3209 description: | 3210 ConfigName is the name of the config that this references, 3211 but this is just provided for lookup/display purposes. The 3212 config in the reference will be identified by its ID. 3213 type: "string" 3214 Isolation: 3215 type: "string" 3216 description: | 3217 Isolation technology of the containers running the service. 3218 (Windows only) 3219 enum: 3220 - "default" 3221 - "process" 3222 - "hyperv" 3223 Init: 3224 description: | 3225 Run an init inside the container that forwards signals and reaps 3226 processes. This field is omitted if empty, and the default (as 3227 configured on the daemon) is used. 3228 type: "boolean" 3229 x-nullable: true 3230 Sysctls: 3231 description: | 3232 Set kernel namedspaced parameters (sysctls) in the container. 3233 The Sysctls option on services accepts the same sysctls as the 3234 are supported on containers. Note that while the same sysctls are 3235 supported, no guarantees or checks are made about their 3236 suitability for a clustered environment, and it's up to the user 3237 to determine whether a given sysctl will work properly in a 3238 Service. 3239 type: "object" 3240 additionalProperties: 3241 type: "string" 3242 # This option is not used by Windows containers 3243 Capabilities: 3244 type: "array" 3245 description: | 3246 A list of kernel capabilities to be available for container (this 3247 overrides the default set). 3248 items: 3249 type: "string" 3250 example: 3251 - "CAP_NET_RAW" 3252 - "CAP_SYS_ADMIN" 3253 - "CAP_SYS_CHROOT" 3254 - "CAP_SYSLOG" 3255 NetworkAttachmentSpec: 3256 description: | 3257 Read-only spec type for non-swarm containers attached to swarm overlay 3258 networks. 3259 3260 <p><br /></p> 3261 3262 > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are 3263 > mutually exclusive. PluginSpec is only used when the Runtime field 3264 > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime 3265 > field is set to `attachment`. 3266 type: "object" 3267 properties: 3268 ContainerID: 3269 description: "ID of the container represented by this task" 3270 type: "string" 3271 Resources: 3272 description: | 3273 Resource requirements which apply to each individual container created 3274 as part of the service. 3275 type: "object" 3276 properties: 3277 Limits: 3278 description: "Define resources limits." 3279 $ref: "#/definitions/Limit" 3280 Reservation: 3281 description: "Define resources reservation." 3282 $ref: "#/definitions/ResourceObject" 3283 RestartPolicy: 3284 description: | 3285 Specification for the restart policy which applies to containers 3286 created as part of this service. 3287 type: "object" 3288 properties: 3289 Condition: 3290 description: "Condition for restart." 3291 type: "string" 3292 enum: 3293 - "none" 3294 - "on-failure" 3295 - "any" 3296 Delay: 3297 description: "Delay between restart attempts." 3298 type: "integer" 3299 format: "int64" 3300 MaxAttempts: 3301 description: | 3302 Maximum attempts to restart a given container before giving up 3303 (default value is 0, which is ignored). 3304 type: "integer" 3305 format: "int64" 3306 default: 0 3307 Window: 3308 description: | 3309 Windows is the time window used to evaluate the restart policy 3310 (default value is 0, which is unbounded). 3311 type: "integer" 3312 format: "int64" 3313 default: 0 3314 Placement: 3315 type: "object" 3316 properties: 3317 Constraints: 3318 description: | 3319 An array of constraint expressions to limit the set of nodes where 3320 a task can be scheduled. Constraint expressions can either use a 3321 _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find 3322 nodes that satisfy every expression (AND match). Constraints can 3323 match node or Docker Engine labels as follows: 3324 3325 node attribute | matches | example 3326 ---------------------|--------------------------------|----------------------------------------------- 3327 `node.id` | Node ID | `node.id==2ivku8v2gvtg4` 3328 `node.hostname` | Node hostname | `node.hostname!=node-2` 3329 `node.role` | Node role (`manager`/`worker`) | `node.role==manager` 3330 `node.platform.os` | Node operating system | `node.platform.os==windows` 3331 `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` 3332 `node.labels` | User-defined node labels | `node.labels.security==high` 3333 `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` 3334 3335 `engine.labels` apply to Docker Engine labels like operating system, 3336 drivers, etc. Swarm administrators add `node.labels` for operational 3337 purposes by using the [`node update endpoint`](#operation/NodeUpdate). 3338 3339 type: "array" 3340 items: 3341 type: "string" 3342 example: 3343 - "node.hostname!=node3.corp.example.com" 3344 - "node.role!=manager" 3345 - "node.labels.type==production" 3346 - "node.platform.os==linux" 3347 - "node.platform.arch==x86_64" 3348 Preferences: 3349 description: | 3350 Preferences provide a way to make the scheduler aware of factors 3351 such as topology. They are provided in order from highest to 3352 lowest precedence. 3353 type: "array" 3354 items: 3355 type: "object" 3356 properties: 3357 Spread: 3358 type: "object" 3359 properties: 3360 SpreadDescriptor: 3361 description: | 3362 label descriptor, such as `engine.labels.az`. 3363 type: "string" 3364 example: 3365 - Spread: 3366 SpreadDescriptor: "node.labels.datacenter" 3367 - Spread: 3368 SpreadDescriptor: "node.labels.rack" 3369 MaxReplicas: 3370 description: | 3371 Maximum number of replicas for per node (default value is 0, which 3372 is unlimited) 3373 type: "integer" 3374 format: "int64" 3375 default: 0 3376 Platforms: 3377 description: | 3378 Platforms stores all the platforms that the service's image can 3379 run on. This field is used in the platform filter for scheduling. 3380 If empty, then the platform filter is off, meaning there are no 3381 scheduling restrictions. 3382 type: "array" 3383 items: 3384 $ref: "#/definitions/Platform" 3385 ForceUpdate: 3386 description: | 3387 A counter that triggers an update even if no relevant parameters have 3388 been changed. 3389 type: "integer" 3390 Runtime: 3391 description: | 3392 Runtime is the type of runtime specified for the task executor. 3393 type: "string" 3394 Networks: 3395 description: "Specifies which networks the service should attach to." 3396 type: "array" 3397 items: 3398 $ref: "#/definitions/NetworkAttachmentConfig" 3399 LogDriver: 3400 description: | 3401 Specifies the log driver to use for tasks created from this spec. If 3402 not present, the default one for the swarm will be used, finally 3403 falling back to the engine default if not specified. 3404 type: "object" 3405 properties: 3406 Name: 3407 type: "string" 3408 Options: 3409 type: "object" 3410 additionalProperties: 3411 type: "string" 3412 3413 TaskState: 3414 type: "string" 3415 enum: 3416 - "new" 3417 - "allocated" 3418 - "pending" 3419 - "assigned" 3420 - "accepted" 3421 - "preparing" 3422 - "ready" 3423 - "starting" 3424 - "running" 3425 - "complete" 3426 - "shutdown" 3427 - "failed" 3428 - "rejected" 3429 - "remove" 3430 - "orphaned" 3431 3432 Task: 3433 type: "object" 3434 properties: 3435 ID: 3436 description: "The ID of the task." 3437 type: "string" 3438 Version: 3439 $ref: "#/definitions/ObjectVersion" 3440 CreatedAt: 3441 type: "string" 3442 format: "dateTime" 3443 UpdatedAt: 3444 type: "string" 3445 format: "dateTime" 3446 Name: 3447 description: "Name of the task." 3448 type: "string" 3449 Labels: 3450 description: "User-defined key/value metadata." 3451 type: "object" 3452 additionalProperties: 3453 type: "string" 3454 Spec: 3455 $ref: "#/definitions/TaskSpec" 3456 ServiceID: 3457 description: "The ID of the service this task is part of." 3458 type: "string" 3459 Slot: 3460 type: "integer" 3461 NodeID: 3462 description: "The ID of the node that this task is on." 3463 type: "string" 3464 AssignedGenericResources: 3465 $ref: "#/definitions/GenericResources" 3466 Status: 3467 type: "object" 3468 properties: 3469 Timestamp: 3470 type: "string" 3471 format: "dateTime" 3472 State: 3473 $ref: "#/definitions/TaskState" 3474 Message: 3475 type: "string" 3476 Err: 3477 type: "string" 3478 ContainerStatus: 3479 type: "object" 3480 properties: 3481 ContainerID: 3482 type: "string" 3483 PID: 3484 type: "integer" 3485 ExitCode: 3486 type: "integer" 3487 DesiredState: 3488 $ref: "#/definitions/TaskState" 3489 JobIteration: 3490 description: | 3491 If the Service this Task belongs to is a job-mode service, contains 3492 the JobIteration of the Service this Task was created for. Absent if 3493 the Task was created for a Replicated or Global Service. 3494 $ref: "#/definitions/ObjectVersion" 3495 example: 3496 ID: "0kzzo1i0y4jz6027t0k7aezc7" 3497 Version: 3498 Index: 71 3499 CreatedAt: "2016-06-07T21:07:31.171892745Z" 3500 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 3501 Spec: 3502 ContainerSpec: 3503 Image: "redis" 3504 Resources: 3505 Limits: {} 3506 Reservations: {} 3507 RestartPolicy: 3508 Condition: "any" 3509 MaxAttempts: 0 3510 Placement: {} 3511 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 3512 Slot: 1 3513 NodeID: "60gvrl6tm78dmak4yl7srz94v" 3514 Status: 3515 Timestamp: "2016-06-07T21:07:31.290032978Z" 3516 State: "running" 3517 Message: "started" 3518 ContainerStatus: 3519 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 3520 PID: 677 3521 DesiredState: "running" 3522 NetworksAttachments: 3523 - Network: 3524 ID: "4qvuz4ko70xaltuqbt8956gd1" 3525 Version: 3526 Index: 18 3527 CreatedAt: "2016-06-07T20:31:11.912919752Z" 3528 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 3529 Spec: 3530 Name: "ingress" 3531 Labels: 3532 com.docker.swarm.internal: "true" 3533 DriverConfiguration: {} 3534 IPAMOptions: 3535 Driver: {} 3536 Configs: 3537 - Subnet: "10.255.0.0/16" 3538 Gateway: "10.255.0.1" 3539 DriverState: 3540 Name: "overlay" 3541 Options: 3542 com.docker.network.driver.overlay.vxlanid_list: "256" 3543 IPAMOptions: 3544 Driver: 3545 Name: "default" 3546 Configs: 3547 - Subnet: "10.255.0.0/16" 3548 Gateway: "10.255.0.1" 3549 Addresses: 3550 - "10.255.0.10/16" 3551 AssignedGenericResources: 3552 - DiscreteResourceSpec: 3553 Kind: "SSD" 3554 Value: 3 3555 - NamedResourceSpec: 3556 Kind: "GPU" 3557 Value: "UUID1" 3558 - NamedResourceSpec: 3559 Kind: "GPU" 3560 Value: "UUID2" 3561 3562 ServiceSpec: 3563 description: "User modifiable configuration for a service." 3564 properties: 3565 Name: 3566 description: "Name of the service." 3567 type: "string" 3568 Labels: 3569 description: "User-defined key/value metadata." 3570 type: "object" 3571 additionalProperties: 3572 type: "string" 3573 TaskTemplate: 3574 $ref: "#/definitions/TaskSpec" 3575 Mode: 3576 description: "Scheduling mode for the service." 3577 type: "object" 3578 properties: 3579 Replicated: 3580 type: "object" 3581 properties: 3582 Replicas: 3583 type: "integer" 3584 format: "int64" 3585 Global: 3586 type: "object" 3587 ReplicatedJob: 3588 description: | 3589 The mode used for services with a finite number of tasks that run 3590 to a completed state. 3591 type: "object" 3592 properties: 3593 MaxConcurrent: 3594 description: | 3595 The maximum number of replicas to run simultaneously. 3596 type: "integer" 3597 format: "int64" 3598 default: 1 3599 TotalCompletions: 3600 description: | 3601 The total number of replicas desired to reach the Completed 3602 state. If unset, will default to the value of `MaxConcurrent` 3603 type: "integer" 3604 format: "int64" 3605 GlobalJob: 3606 description: | 3607 The mode used for services which run a task to the completed state 3608 on each valid node. 3609 type: "object" 3610 UpdateConfig: 3611 description: "Specification for the update strategy of the service." 3612 type: "object" 3613 properties: 3614 Parallelism: 3615 description: | 3616 Maximum number of tasks to be updated in one iteration (0 means 3617 unlimited parallelism). 3618 type: "integer" 3619 format: "int64" 3620 Delay: 3621 description: "Amount of time between updates, in nanoseconds." 3622 type: "integer" 3623 format: "int64" 3624 FailureAction: 3625 description: | 3626 Action to take if an updated task fails to run, or stops running 3627 during the update. 3628 type: "string" 3629 enum: 3630 - "continue" 3631 - "pause" 3632 - "rollback" 3633 Monitor: 3634 description: | 3635 Amount of time to monitor each updated task for failures, in 3636 nanoseconds. 3637 type: "integer" 3638 format: "int64" 3639 MaxFailureRatio: 3640 description: | 3641 The fraction of tasks that may fail during an update before the 3642 failure action is invoked, specified as a floating point number 3643 between 0 and 1. 3644 type: "number" 3645 default: 0 3646 Order: 3647 description: | 3648 The order of operations when rolling out an updated task. Either 3649 the old task is shut down before the new task is started, or the 3650 new task is started before the old task is shut down. 3651 type: "string" 3652 enum: 3653 - "stop-first" 3654 - "start-first" 3655 RollbackConfig: 3656 description: "Specification for the rollback strategy of the service." 3657 type: "object" 3658 properties: 3659 Parallelism: 3660 description: | 3661 Maximum number of tasks to be rolled back in one iteration (0 means 3662 unlimited parallelism). 3663 type: "integer" 3664 format: "int64" 3665 Delay: 3666 description: | 3667 Amount of time between rollback iterations, in nanoseconds. 3668 type: "integer" 3669 format: "int64" 3670 FailureAction: 3671 description: | 3672 Action to take if an rolled back task fails to run, or stops 3673 running during the rollback. 3674 type: "string" 3675 enum: 3676 - "continue" 3677 - "pause" 3678 Monitor: 3679 description: | 3680 Amount of time to monitor each rolled back task for failures, in 3681 nanoseconds. 3682 type: "integer" 3683 format: "int64" 3684 MaxFailureRatio: 3685 description: | 3686 The fraction of tasks that may fail during a rollback before the 3687 failure action is invoked, specified as a floating point number 3688 between 0 and 1. 3689 type: "number" 3690 default: 0 3691 Order: 3692 description: | 3693 The order of operations when rolling back a task. Either the old 3694 task is shut down before the new task is started, or the new task 3695 is started before the old task is shut down. 3696 type: "string" 3697 enum: 3698 - "stop-first" 3699 - "start-first" 3700 Networks: 3701 description: "Specifies which networks the service should attach to." 3702 type: "array" 3703 items: 3704 $ref: "#/definitions/NetworkAttachmentConfig" 3705 3706 EndpointSpec: 3707 $ref: "#/definitions/EndpointSpec" 3708 3709 EndpointPortConfig: 3710 type: "object" 3711 properties: 3712 Name: 3713 type: "string" 3714 Protocol: 3715 type: "string" 3716 enum: 3717 - "tcp" 3718 - "udp" 3719 - "sctp" 3720 TargetPort: 3721 description: "The port inside the container." 3722 type: "integer" 3723 PublishedPort: 3724 description: "The port on the swarm hosts." 3725 type: "integer" 3726 PublishMode: 3727 description: | 3728 The mode in which port is published. 3729 3730 <p><br /></p> 3731 3732 - "ingress" makes the target port accessible on every node, 3733 regardless of whether there is a task for the service running on 3734 that node or not. 3735 - "host" bypasses the routing mesh and publish the port directly on 3736 the swarm node where that service is running. 3737 3738 type: "string" 3739 enum: 3740 - "ingress" 3741 - "host" 3742 default: "ingress" 3743 example: "ingress" 3744 3745 EndpointSpec: 3746 description: "Properties that can be configured to access and load balance a service." 3747 type: "object" 3748 properties: 3749 Mode: 3750 description: | 3751 The mode of resolution to use for internal load balancing between tasks. 3752 type: "string" 3753 enum: 3754 - "vip" 3755 - "dnsrr" 3756 default: "vip" 3757 Ports: 3758 description: | 3759 List of exposed ports that this service is accessible on from the 3760 outside. Ports can only be provided if `vip` resolution mode is used. 3761 type: "array" 3762 items: 3763 $ref: "#/definitions/EndpointPortConfig" 3764 3765 Service: 3766 type: "object" 3767 properties: 3768 ID: 3769 type: "string" 3770 Version: 3771 $ref: "#/definitions/ObjectVersion" 3772 CreatedAt: 3773 type: "string" 3774 format: "dateTime" 3775 UpdatedAt: 3776 type: "string" 3777 format: "dateTime" 3778 Spec: 3779 $ref: "#/definitions/ServiceSpec" 3780 Endpoint: 3781 type: "object" 3782 properties: 3783 Spec: 3784 $ref: "#/definitions/EndpointSpec" 3785 Ports: 3786 type: "array" 3787 items: 3788 $ref: "#/definitions/EndpointPortConfig" 3789 VirtualIPs: 3790 type: "array" 3791 items: 3792 type: "object" 3793 properties: 3794 NetworkID: 3795 type: "string" 3796 Addr: 3797 type: "string" 3798 UpdateStatus: 3799 description: "The status of a service update." 3800 type: "object" 3801 properties: 3802 State: 3803 type: "string" 3804 enum: 3805 - "updating" 3806 - "paused" 3807 - "completed" 3808 StartedAt: 3809 type: "string" 3810 format: "dateTime" 3811 CompletedAt: 3812 type: "string" 3813 format: "dateTime" 3814 Message: 3815 type: "string" 3816 ServiceStatus: 3817 description: | 3818 The status of the service's tasks. Provided only when requested as 3819 part of a ServiceList operation. 3820 type: "object" 3821 properties: 3822 RunningTasks: 3823 description: | 3824 The number of tasks for the service currently in the Running state. 3825 type: "integer" 3826 format: "uint64" 3827 example: 7 3828 DesiredTasks: 3829 description: | 3830 The number of tasks for the service desired to be running. 3831 For replicated services, this is the replica count from the 3832 service spec. For global services, this is computed by taking 3833 count of all tasks for the service with a Desired State other 3834 than Shutdown. 3835 type: "integer" 3836 format: "uint64" 3837 example: 10 3838 CompletedTasks: 3839 description: | 3840 The number of tasks for a job that are in the Completed state. 3841 This field must be cross-referenced with the service type, as the 3842 value of 0 may mean the service is not in a job mode, or it may 3843 mean the job-mode service has no tasks yet Completed. 3844 type: "integer" 3845 format: "uint64" 3846 JobStatus: 3847 description: | 3848 The status of the service when it is in one of ReplicatedJob or 3849 GlobalJob modes. Absent on Replicated and Global mode services. The 3850 JobIteration is an ObjectVersion, but unlike the Service's version, 3851 does not need to be sent with an update request. 3852 type: "object" 3853 properties: 3854 JobIteration: 3855 description: | 3856 JobIteration is a value increased each time a Job is executed, 3857 successfully or otherwise. "Executed", in this case, means the 3858 job as a whole has been started, not that an individual Task has 3859 been launched. A job is "Executed" when its ServiceSpec is 3860 updated. JobIteration can be used to disambiguate Tasks belonging 3861 to different executions of a job. Though JobIteration will 3862 increase with each subsequent execution, it may not necessarily 3863 increase by 1, and so JobIteration should not be used to 3864 $ref: "#/definitions/ObjectVersion" 3865 LastExecution: 3866 description: | 3867 The last time, as observed by the server, that this job was 3868 started. 3869 type: "string" 3870 format: "dateTime" 3871 example: 3872 ID: "9mnpnzenvg8p8tdbtq4wvbkcz" 3873 Version: 3874 Index: 19 3875 CreatedAt: "2016-06-07T21:05:51.880065305Z" 3876 UpdatedAt: "2016-06-07T21:07:29.962229872Z" 3877 Spec: 3878 Name: "hopeful_cori" 3879 TaskTemplate: 3880 ContainerSpec: 3881 Image: "redis" 3882 Resources: 3883 Limits: {} 3884 Reservations: {} 3885 RestartPolicy: 3886 Condition: "any" 3887 MaxAttempts: 0 3888 Placement: {} 3889 ForceUpdate: 0 3890 Mode: 3891 Replicated: 3892 Replicas: 1 3893 UpdateConfig: 3894 Parallelism: 1 3895 Delay: 1000000000 3896 FailureAction: "pause" 3897 Monitor: 15000000000 3898 MaxFailureRatio: 0.15 3899 RollbackConfig: 3900 Parallelism: 1 3901 Delay: 1000000000 3902 FailureAction: "pause" 3903 Monitor: 15000000000 3904 MaxFailureRatio: 0.15 3905 EndpointSpec: 3906 Mode: "vip" 3907 Ports: 3908 - 3909 Protocol: "tcp" 3910 TargetPort: 6379 3911 PublishedPort: 30001 3912 Endpoint: 3913 Spec: 3914 Mode: "vip" 3915 Ports: 3916 - 3917 Protocol: "tcp" 3918 TargetPort: 6379 3919 PublishedPort: 30001 3920 Ports: 3921 - 3922 Protocol: "tcp" 3923 TargetPort: 6379 3924 PublishedPort: 30001 3925 VirtualIPs: 3926 - 3927 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 3928 Addr: "10.255.0.2/16" 3929 - 3930 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 3931 Addr: "10.255.0.3/16" 3932 3933 ImageDeleteResponseItem: 3934 type: "object" 3935 properties: 3936 Untagged: 3937 description: "The image ID of an image that was untagged" 3938 type: "string" 3939 Deleted: 3940 description: "The image ID of an image that was deleted" 3941 type: "string" 3942 3943 ServiceUpdateResponse: 3944 type: "object" 3945 properties: 3946 Warnings: 3947 description: "Optional warning messages" 3948 type: "array" 3949 items: 3950 type: "string" 3951 example: 3952 Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" 3953 3954 ContainerSummary: 3955 type: "array" 3956 items: 3957 type: "object" 3958 properties: 3959 Id: 3960 description: "The ID of this container" 3961 type: "string" 3962 x-go-name: "ID" 3963 Names: 3964 description: "The names that this container has been given" 3965 type: "array" 3966 items: 3967 type: "string" 3968 Image: 3969 description: "The name of the image used when creating this container" 3970 type: "string" 3971 ImageID: 3972 description: "The ID of the image that this container was created from" 3973 type: "string" 3974 Command: 3975 description: "Command to run when starting the container" 3976 type: "string" 3977 Created: 3978 description: "When the container was created" 3979 type: "integer" 3980 format: "int64" 3981 Ports: 3982 description: "The ports exposed by this container" 3983 type: "array" 3984 items: 3985 $ref: "#/definitions/Port" 3986 SizeRw: 3987 description: "The size of files that have been created or changed by this container" 3988 type: "integer" 3989 format: "int64" 3990 SizeRootFs: 3991 description: "The total size of all the files in this container" 3992 type: "integer" 3993 format: "int64" 3994 Labels: 3995 description: "User-defined key/value metadata." 3996 type: "object" 3997 additionalProperties: 3998 type: "string" 3999 State: 4000 description: "The state of this container (e.g. `Exited`)" 4001 type: "string" 4002 Status: 4003 description: "Additional human-readable status of this container (e.g. `Exit 0`)" 4004 type: "string" 4005 HostConfig: 4006 type: "object" 4007 properties: 4008 NetworkMode: 4009 type: "string" 4010 NetworkSettings: 4011 description: "A summary of the container's network settings" 4012 type: "object" 4013 properties: 4014 Networks: 4015 type: "object" 4016 additionalProperties: 4017 $ref: "#/definitions/EndpointSettings" 4018 Mounts: 4019 type: "array" 4020 items: 4021 $ref: "#/definitions/Mount" 4022 4023 Driver: 4024 description: "Driver represents a driver (network, logging, secrets)." 4025 type: "object" 4026 required: [Name] 4027 properties: 4028 Name: 4029 description: "Name of the driver." 4030 type: "string" 4031 x-nullable: false 4032 example: "some-driver" 4033 Options: 4034 description: "Key/value map of driver-specific options." 4035 type: "object" 4036 x-nullable: false 4037 additionalProperties: 4038 type: "string" 4039 example: 4040 OptionA: "value for driver-specific option A" 4041 OptionB: "value for driver-specific option B" 4042 4043 SecretSpec: 4044 type: "object" 4045 properties: 4046 Name: 4047 description: "User-defined name of the secret." 4048 type: "string" 4049 Labels: 4050 description: "User-defined key/value metadata." 4051 type: "object" 4052 additionalProperties: 4053 type: "string" 4054 example: 4055 com.example.some-label: "some-value" 4056 com.example.some-other-label: "some-other-value" 4057 Data: 4058 description: | 4059 Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) 4060 data to store as secret. 4061 4062 This field is only used to _create_ a secret, and is not returned by 4063 other endpoints. 4064 type: "string" 4065 example: "" 4066 Driver: 4067 description: | 4068 Name of the secrets driver used to fetch the secret's value from an 4069 external secret store. 4070 $ref: "#/definitions/Driver" 4071 Templating: 4072 description: | 4073 Templating driver, if applicable 4074 4075 Templating controls whether and how to evaluate the config payload as 4076 a template. If no driver is set, no templating is used. 4077 $ref: "#/definitions/Driver" 4078 4079 Secret: 4080 type: "object" 4081 properties: 4082 ID: 4083 type: "string" 4084 example: "blt1owaxmitz71s9v5zh81zun" 4085 Version: 4086 $ref: "#/definitions/ObjectVersion" 4087 CreatedAt: 4088 type: "string" 4089 format: "dateTime" 4090 example: "2017-07-20T13:55:28.678958722Z" 4091 UpdatedAt: 4092 type: "string" 4093 format: "dateTime" 4094 example: "2017-07-20T13:55:28.678958722Z" 4095 Spec: 4096 $ref: "#/definitions/SecretSpec" 4097 4098 ConfigSpec: 4099 type: "object" 4100 properties: 4101 Name: 4102 description: "User-defined name of the config." 4103 type: "string" 4104 Labels: 4105 description: "User-defined key/value metadata." 4106 type: "object" 4107 additionalProperties: 4108 type: "string" 4109 Data: 4110 description: | 4111 Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) 4112 config data. 4113 type: "string" 4114 Templating: 4115 description: | 4116 Templating driver, if applicable 4117 4118 Templating controls whether and how to evaluate the config payload as 4119 a template. If no driver is set, no templating is used. 4120 $ref: "#/definitions/Driver" 4121 4122 Config: 4123 type: "object" 4124 properties: 4125 ID: 4126 type: "string" 4127 Version: 4128 $ref: "#/definitions/ObjectVersion" 4129 CreatedAt: 4130 type: "string" 4131 format: "dateTime" 4132 UpdatedAt: 4133 type: "string" 4134 format: "dateTime" 4135 Spec: 4136 $ref: "#/definitions/ConfigSpec" 4137 4138 ContainerState: 4139 description: | 4140 ContainerState stores container's running state. It's part of ContainerJSONBase 4141 and will be returned by the "inspect" command. 4142 type: "object" 4143 properties: 4144 Status: 4145 description: | 4146 String representation of the container state. Can be one of "created", 4147 "running", "paused", "restarting", "removing", "exited", or "dead". 4148 type: "string" 4149 enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] 4150 example: "running" 4151 Running: 4152 description: | 4153 Whether this container is running. 4154 4155 Note that a running container can be _paused_. The `Running` and `Paused` 4156 booleans are not mutually exclusive: 4157 4158 When pausing a container (on Linux), the freezer cgroup is used to suspend 4159 all processes in the container. Freezing the process requires the process to 4160 be running. As a result, paused containers are both `Running` _and_ `Paused`. 4161 4162 Use the `Status` field instead to determine if a container's state is "running". 4163 type: "boolean" 4164 example: true 4165 Paused: 4166 description: "Whether this container is paused." 4167 type: "boolean" 4168 example: false 4169 Restarting: 4170 description: "Whether this container is restarting." 4171 type: "boolean" 4172 example: false 4173 OOMKilled: 4174 description: | 4175 Whether this container has been killed because it ran out of memory. 4176 type: "boolean" 4177 example: false 4178 Dead: 4179 type: "boolean" 4180 example: false 4181 Pid: 4182 description: "The process ID of this container" 4183 type: "integer" 4184 example: 1234 4185 ExitCode: 4186 description: "The last exit code of this container" 4187 type: "integer" 4188 example: 0 4189 Error: 4190 type: "string" 4191 StartedAt: 4192 description: "The time when this container was last started." 4193 type: "string" 4194 example: "2020-01-06T09:06:59.461876391Z" 4195 FinishedAt: 4196 description: "The time when this container last exited." 4197 type: "string" 4198 example: "2020-01-06T09:07:59.461876391Z" 4199 Health: 4200 x-nullable: true 4201 $ref: "#/definitions/Health" 4202 4203 SystemInfo: 4204 type: "object" 4205 properties: 4206 ID: 4207 description: | 4208 Unique identifier of the daemon. 4209 4210 <p><br /></p> 4211 4212 > **Note**: The format of the ID itself is not part of the API, and 4213 > should not be considered stable. 4214 type: "string" 4215 example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" 4216 Containers: 4217 description: "Total number of containers on the host." 4218 type: "integer" 4219 example: 14 4220 ContainersRunning: 4221 description: | 4222 Number of containers with status `"running"`. 4223 type: "integer" 4224 example: 3 4225 ContainersPaused: 4226 description: | 4227 Number of containers with status `"paused"`. 4228 type: "integer" 4229 example: 1 4230 ContainersStopped: 4231 description: | 4232 Number of containers with status `"stopped"`. 4233 type: "integer" 4234 example: 10 4235 Images: 4236 description: | 4237 Total number of images on the host. 4238 4239 Both _tagged_ and _untagged_ (dangling) images are counted. 4240 type: "integer" 4241 example: 508 4242 Driver: 4243 description: "Name of the storage driver in use." 4244 type: "string" 4245 example: "overlay2" 4246 DriverStatus: 4247 description: | 4248 Information specific to the storage driver, provided as 4249 "label" / "value" pairs. 4250 4251 This information is provided by the storage driver, and formatted 4252 in a way consistent with the output of `docker info` on the command 4253 line. 4254 4255 <p><br /></p> 4256 4257 > **Note**: The information returned in this field, including the 4258 > formatting of values and labels, should not be considered stable, 4259 > and may change without notice. 4260 type: "array" 4261 items: 4262 type: "array" 4263 items: 4264 type: "string" 4265 example: 4266 - ["Backing Filesystem", "extfs"] 4267 - ["Supports d_type", "true"] 4268 - ["Native Overlay Diff", "true"] 4269 DockerRootDir: 4270 description: | 4271 Root directory of persistent Docker state. 4272 4273 Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` 4274 on Windows. 4275 type: "string" 4276 example: "/var/lib/docker" 4277 Plugins: 4278 $ref: "#/definitions/PluginsInfo" 4279 MemoryLimit: 4280 description: "Indicates if the host has memory limit support enabled." 4281 type: "boolean" 4282 example: true 4283 SwapLimit: 4284 description: "Indicates if the host has memory swap limit support enabled." 4285 type: "boolean" 4286 example: true 4287 KernelMemory: 4288 description: "Indicates if the host has kernel memory limit support enabled." 4289 type: "boolean" 4290 example: true 4291 CpuCfsPeriod: 4292 description: | 4293 Indicates if CPU CFS(Completely Fair Scheduler) period is supported by 4294 the host. 4295 type: "boolean" 4296 example: true 4297 CpuCfsQuota: 4298 description: | 4299 Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by 4300 the host. 4301 type: "boolean" 4302 example: true 4303 CPUShares: 4304 description: | 4305 Indicates if CPU Shares limiting is supported by the host. 4306 type: "boolean" 4307 example: true 4308 CPUSet: 4309 description: | 4310 Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. 4311 4312 See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) 4313 type: "boolean" 4314 example: true 4315 PidsLimit: 4316 description: "Indicates if the host kernel has PID limit support enabled." 4317 type: "boolean" 4318 example: true 4319 OomKillDisable: 4320 description: "Indicates if OOM killer disable is supported on the host." 4321 type: "boolean" 4322 IPv4Forwarding: 4323 description: "Indicates IPv4 forwarding is enabled." 4324 type: "boolean" 4325 example: true 4326 BridgeNfIptables: 4327 description: "Indicates if `bridge-nf-call-iptables` is available on the host." 4328 type: "boolean" 4329 example: true 4330 BridgeNfIp6tables: 4331 description: "Indicates if `bridge-nf-call-ip6tables` is available on the host." 4332 type: "boolean" 4333 example: true 4334 Debug: 4335 description: | 4336 Indicates if the daemon is running in debug-mode / with debug-level 4337 logging enabled. 4338 type: "boolean" 4339 example: true 4340 NFd: 4341 description: | 4342 The total number of file Descriptors in use by the daemon process. 4343 4344 This information is only returned if debug-mode is enabled. 4345 type: "integer" 4346 example: 64 4347 NGoroutines: 4348 description: | 4349 The number of goroutines that currently exist. 4350 4351 This information is only returned if debug-mode is enabled. 4352 type: "integer" 4353 example: 174 4354 SystemTime: 4355 description: | 4356 Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) 4357 format with nano-seconds. 4358 type: "string" 4359 example: "2017-08-08T20:28:29.06202363Z" 4360 LoggingDriver: 4361 description: | 4362 The logging driver to use as a default for new containers. 4363 type: "string" 4364 CgroupDriver: 4365 description: | 4366 The driver to use for managing cgroups. 4367 type: "string" 4368 enum: ["cgroupfs", "systemd", "none"] 4369 default: "cgroupfs" 4370 example: "cgroupfs" 4371 CgroupVersion: 4372 description: | 4373 The version of the cgroup. 4374 type: "string" 4375 enum: ["1", "2"] 4376 default: "1" 4377 example: "1" 4378 NEventsListener: 4379 description: "Number of event listeners subscribed." 4380 type: "integer" 4381 example: 30 4382 KernelVersion: 4383 description: | 4384 Kernel version of the host. 4385 4386 On Linux, this information obtained from `uname`. On Windows this 4387 information is queried from the <kbd>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\</kbd> 4388 registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. 4389 type: "string" 4390 example: "4.9.38-moby" 4391 OperatingSystem: 4392 description: | 4393 Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS" 4394 or "Windows Server 2016 Datacenter" 4395 type: "string" 4396 example: "Alpine Linux v3.5" 4397 OSVersion: 4398 description: | 4399 Version of the host's operating system 4400 4401 <p><br /></p> 4402 4403 > **Note**: The information returned in this field, including its 4404 > very existence, and the formatting of values, should not be considered 4405 > stable, and may change without notice. 4406 type: "string" 4407 example: "16.04" 4408 OSType: 4409 description: | 4410 Generic type of the operating system of the host, as returned by the 4411 Go runtime (`GOOS`). 4412 4413 Currently returned values are "linux" and "windows". A full list of 4414 possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment). 4415 type: "string" 4416 example: "linux" 4417 Architecture: 4418 description: | 4419 Hardware architecture of the host, as returned by the Go runtime 4420 (`GOARCH`). 4421 4422 A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment). 4423 type: "string" 4424 example: "x86_64" 4425 NCPU: 4426 description: | 4427 The number of logical CPUs usable by the daemon. 4428 4429 The number of available CPUs is checked by querying the operating 4430 system when the daemon starts. Changes to operating system CPU 4431 allocation after the daemon is started are not reflected. 4432 type: "integer" 4433 example: 4 4434 MemTotal: 4435 description: | 4436 Total amount of physical memory available on the host, in kilobytes (kB). 4437 type: "integer" 4438 format: "int64" 4439 example: 2095882240 4440 4441 IndexServerAddress: 4442 description: | 4443 Address / URL of the index server that is used for image search, 4444 and as a default for user authentication for Docker Hub and Docker Cloud. 4445 default: "https://index.docker.io/v1/" 4446 type: "string" 4447 example: "https://index.docker.io/v1/" 4448 RegistryConfig: 4449 $ref: "#/definitions/RegistryServiceConfig" 4450 GenericResources: 4451 $ref: "#/definitions/GenericResources" 4452 HttpProxy: 4453 description: | 4454 HTTP-proxy configured for the daemon. This value is obtained from the 4455 [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. 4456 Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL 4457 are masked in the API response. 4458 4459 Containers do not automatically inherit this configuration. 4460 type: "string" 4461 example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080" 4462 HttpsProxy: 4463 description: | 4464 HTTPS-proxy configured for the daemon. This value is obtained from the 4465 [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. 4466 Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL 4467 are masked in the API response. 4468 4469 Containers do not automatically inherit this configuration. 4470 type: "string" 4471 example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443" 4472 NoProxy: 4473 description: | 4474 Comma-separated list of domain extensions for which no proxy should be 4475 used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) 4476 environment variable. 4477 4478 Containers do not automatically inherit this configuration. 4479 type: "string" 4480 example: "*.local, 169.254/16" 4481 Name: 4482 description: "Hostname of the host." 4483 type: "string" 4484 example: "node5.corp.example.com" 4485 Labels: 4486 description: | 4487 User-defined labels (key/value metadata) as set on the daemon. 4488 4489 <p><br /></p> 4490 4491 > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, 4492 > set through the daemon configuration, and _node_ labels, set from a 4493 > manager node in the Swarm. Node labels are not included in this 4494 > field. Node labels can be retrieved using the `/nodes/(id)` endpoint 4495 > on a manager node in the Swarm. 4496 type: "array" 4497 items: 4498 type: "string" 4499 example: ["storage=ssd", "production"] 4500 ExperimentalBuild: 4501 description: | 4502 Indicates if experimental features are enabled on the daemon. 4503 type: "boolean" 4504 example: true 4505 ServerVersion: 4506 description: | 4507 Version string of the daemon. 4508 4509 > **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) 4510 > returns the Swarm version instead of the daemon version, for example 4511 > `swarm/1.2.8`. 4512 type: "string" 4513 example: "17.06.0-ce" 4514 ClusterStore: 4515 description: | 4516 URL of the distributed storage backend. 4517 4518 4519 The storage backend is used for multihost networking (to store 4520 network and endpoint information) and by the node discovery mechanism. 4521 4522 <p><br /></p> 4523 4524 > **Deprecated**: This field is only propagated when using standalone Swarm 4525 > mode, and overlay networking using an external k/v store. Overlay 4526 > networks with Swarm mode enabled use the built-in raft store, and 4527 > this field will be empty. 4528 type: "string" 4529 example: "consul://consul.corp.example.com:8600/some/path" 4530 ClusterAdvertise: 4531 description: | 4532 The network endpoint that the Engine advertises for the purpose of 4533 node discovery. ClusterAdvertise is a `host:port` combination on which 4534 the daemon is reachable by other hosts. 4535 4536 <p><br /></p> 4537 4538 > **Deprecated**: This field is only propagated when using standalone Swarm 4539 > mode, and overlay networking using an external k/v store. Overlay 4540 > networks with Swarm mode enabled use the built-in raft store, and 4541 > this field will be empty. 4542 type: "string" 4543 example: "node5.corp.example.com:8000" 4544 Runtimes: 4545 description: | 4546 List of [OCI compliant](https://github.com/opencontainers/runtime-spec) 4547 runtimes configured on the daemon. Keys hold the "name" used to 4548 reference the runtime. 4549 4550 The Docker daemon relies on an OCI compliant runtime (invoked via the 4551 `containerd` daemon) as its interface to the Linux kernel namespaces, 4552 cgroups, and SELinux. 4553 4554 The default runtime is `runc`, and automatically configured. Additional 4555 runtimes can be configured by the user and will be listed here. 4556 type: "object" 4557 additionalProperties: 4558 $ref: "#/definitions/Runtime" 4559 default: 4560 runc: 4561 path: "runc" 4562 example: 4563 runc: 4564 path: "runc" 4565 runc-master: 4566 path: "/go/bin/runc" 4567 custom: 4568 path: "/usr/local/bin/my-oci-runtime" 4569 runtimeArgs: ["--debug", "--systemd-cgroup=false"] 4570 DefaultRuntime: 4571 description: | 4572 Name of the default OCI runtime that is used when starting containers. 4573 4574 The default can be overridden per-container at create time. 4575 type: "string" 4576 default: "runc" 4577 example: "runc" 4578 Swarm: 4579 $ref: "#/definitions/SwarmInfo" 4580 LiveRestoreEnabled: 4581 description: | 4582 Indicates if live restore is enabled. 4583 4584 If enabled, containers are kept running when the daemon is shutdown 4585 or upon daemon start if running containers are detected. 4586 type: "boolean" 4587 default: false 4588 example: false 4589 Isolation: 4590 description: | 4591 Represents the isolation technology to use as a default for containers. 4592 The supported values are platform-specific. 4593 4594 If no isolation value is specified on daemon start, on Windows client, 4595 the default is `hyperv`, and on Windows server, the default is `process`. 4596 4597 This option is currently not used on other platforms. 4598 default: "default" 4599 type: "string" 4600 enum: 4601 - "default" 4602 - "hyperv" 4603 - "process" 4604 InitBinary: 4605 description: | 4606 Name and, optional, path of the `docker-init` binary. 4607 4608 If the path is omitted, the daemon searches the host's `$PATH` for the 4609 binary and uses the first result. 4610 type: "string" 4611 example: "docker-init" 4612 ContainerdCommit: 4613 $ref: "#/definitions/Commit" 4614 RuncCommit: 4615 $ref: "#/definitions/Commit" 4616 InitCommit: 4617 $ref: "#/definitions/Commit" 4618 SecurityOptions: 4619 description: | 4620 List of security features that are enabled on the daemon, such as 4621 apparmor, seccomp, SELinux, user-namespaces (userns), and rootless. 4622 4623 Additional configuration options for each security feature may 4624 be present, and are included as a comma-separated list of key/value 4625 pairs. 4626 type: "array" 4627 items: 4628 type: "string" 4629 example: 4630 - "name=apparmor" 4631 - "name=seccomp,profile=default" 4632 - "name=selinux" 4633 - "name=userns" 4634 - "name=rootless" 4635 ProductLicense: 4636 description: | 4637 Reports a summary of the product license on the daemon. 4638 4639 If a commercial license has been applied to the daemon, information 4640 such as number of nodes, and expiration are included. 4641 type: "string" 4642 example: "Community Engine" 4643 Warnings: 4644 description: | 4645 List of warnings / informational messages about missing features, or 4646 issues related to the daemon configuration. 4647 4648 These messages can be printed by the client as information to the user. 4649 type: "array" 4650 items: 4651 type: "string" 4652 example: 4653 - "WARNING: No memory limit support" 4654 - "WARNING: bridge-nf-call-iptables is disabled" 4655 - "WARNING: bridge-nf-call-ip6tables is disabled" 4656 4657 4658 # PluginsInfo is a temp struct holding Plugins name 4659 # registered with docker daemon. It is used by Info struct 4660 PluginsInfo: 4661 description: | 4662 Available plugins per type. 4663 4664 <p><br /></p> 4665 4666 > **Note**: Only unmanaged (V1) plugins are included in this list. 4667 > V1 plugins are "lazily" loaded, and are not returned in this list 4668 > if there is no resource using the plugin. 4669 type: "object" 4670 properties: 4671 Volume: 4672 description: "Names of available volume-drivers, and network-driver plugins." 4673 type: "array" 4674 items: 4675 type: "string" 4676 example: ["local"] 4677 Network: 4678 description: "Names of available network-drivers, and network-driver plugins." 4679 type: "array" 4680 items: 4681 type: "string" 4682 example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] 4683 Authorization: 4684 description: "Names of available authorization plugins." 4685 type: "array" 4686 items: 4687 type: "string" 4688 example: ["img-authz-plugin", "hbm"] 4689 Log: 4690 description: "Names of available logging-drivers, and logging-driver plugins." 4691 type: "array" 4692 items: 4693 type: "string" 4694 example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"] 4695 4696 4697 RegistryServiceConfig: 4698 description: | 4699 RegistryServiceConfig stores daemon registry services configuration. 4700 type: "object" 4701 x-nullable: true 4702 properties: 4703 AllowNondistributableArtifactsCIDRs: 4704 description: | 4705 List of IP ranges to which nondistributable artifacts can be pushed, 4706 using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). 4707 4708 Some images (for example, Windows base images) contain artifacts 4709 whose distribution is restricted by license. When these images are 4710 pushed to a registry, restricted artifacts are not included. 4711 4712 This configuration override this behavior, and enables the daemon to 4713 push nondistributable artifacts to all registries whose resolved IP 4714 address is within the subnet described by the CIDR syntax. 4715 4716 This option is useful when pushing images containing 4717 nondistributable artifacts to a registry on an air-gapped network so 4718 hosts on that network can pull the images without connecting to 4719 another server. 4720 4721 > **Warning**: Nondistributable artifacts typically have restrictions 4722 > on how and where they can be distributed and shared. Only use this 4723 > feature to push artifacts to private registries and ensure that you 4724 > are in compliance with any terms that cover redistributing 4725 > nondistributable artifacts. 4726 4727 type: "array" 4728 items: 4729 type: "string" 4730 example: ["::1/128", "127.0.0.0/8"] 4731 AllowNondistributableArtifactsHostnames: 4732 description: | 4733 List of registry hostnames to which nondistributable artifacts can be 4734 pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`. 4735 4736 Some images (for example, Windows base images) contain artifacts 4737 whose distribution is restricted by license. When these images are 4738 pushed to a registry, restricted artifacts are not included. 4739 4740 This configuration override this behavior for the specified 4741 registries. 4742 4743 This option is useful when pushing images containing 4744 nondistributable artifacts to a registry on an air-gapped network so 4745 hosts on that network can pull the images without connecting to 4746 another server. 4747 4748 > **Warning**: Nondistributable artifacts typically have restrictions 4749 > on how and where they can be distributed and shared. Only use this 4750 > feature to push artifacts to private registries and ensure that you 4751 > are in compliance with any terms that cover redistributing 4752 > nondistributable artifacts. 4753 type: "array" 4754 items: 4755 type: "string" 4756 example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"] 4757 InsecureRegistryCIDRs: 4758 description: | 4759 List of IP ranges of insecure registries, using the CIDR syntax 4760 ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries 4761 accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates 4762 from unknown CAs) communication. 4763 4764 By default, local registries (`127.0.0.0/8`) are configured as 4765 insecure. All other registries are secure. Communicating with an 4766 insecure registry is not possible if the daemon assumes that registry 4767 is secure. 4768 4769 This configuration override this behavior, insecure communication with 4770 registries whose resolved IP address is within the subnet described by 4771 the CIDR syntax. 4772 4773 Registries can also be marked insecure by hostname. Those registries 4774 are listed under `IndexConfigs` and have their `Secure` field set to 4775 `false`. 4776 4777 > **Warning**: Using this option can be useful when running a local 4778 > registry, but introduces security vulnerabilities. This option 4779 > should therefore ONLY be used for testing purposes. For increased 4780 > security, users should add their CA to their system's list of trusted 4781 > CAs instead of enabling this option. 4782 type: "array" 4783 items: 4784 type: "string" 4785 example: ["::1/128", "127.0.0.0/8"] 4786 IndexConfigs: 4787 type: "object" 4788 additionalProperties: 4789 $ref: "#/definitions/IndexInfo" 4790 example: 4791 "127.0.0.1:5000": 4792 "Name": "127.0.0.1:5000" 4793 "Mirrors": [] 4794 "Secure": false 4795 "Official": false 4796 "[2001:db8:a0b:12f0::1]:80": 4797 "Name": "[2001:db8:a0b:12f0::1]:80" 4798 "Mirrors": [] 4799 "Secure": false 4800 "Official": false 4801 "docker.io": 4802 Name: "docker.io" 4803 Mirrors: ["https://hub-mirror.corp.example.com:5000/"] 4804 Secure: true 4805 Official: true 4806 "registry.internal.corp.example.com:3000": 4807 Name: "registry.internal.corp.example.com:3000" 4808 Mirrors: [] 4809 Secure: false 4810 Official: false 4811 Mirrors: 4812 description: | 4813 List of registry URLs that act as a mirror for the official 4814 (`docker.io`) registry. 4815 4816 type: "array" 4817 items: 4818 type: "string" 4819 example: 4820 - "https://hub-mirror.corp.example.com:5000/" 4821 - "https://[2001:db8:a0b:12f0::1]/" 4822 4823 IndexInfo: 4824 description: 4825 IndexInfo contains information about a registry. 4826 type: "object" 4827 x-nullable: true 4828 properties: 4829 Name: 4830 description: | 4831 Name of the registry, such as "docker.io". 4832 type: "string" 4833 example: "docker.io" 4834 Mirrors: 4835 description: | 4836 List of mirrors, expressed as URIs. 4837 type: "array" 4838 items: 4839 type: "string" 4840 example: 4841 - "https://hub-mirror.corp.example.com:5000/" 4842 - "https://registry-2.docker.io/" 4843 - "https://registry-3.docker.io/" 4844 Secure: 4845 description: | 4846 Indicates if the registry is part of the list of insecure 4847 registries. 4848 4849 If `false`, the registry is insecure. Insecure registries accept 4850 un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from 4851 unknown CAs) communication. 4852 4853 > **Warning**: Insecure registries can be useful when running a local 4854 > registry. However, because its use creates security vulnerabilities 4855 > it should ONLY be enabled for testing purposes. For increased 4856 > security, users should add their CA to their system's list of 4857 > trusted CAs instead of enabling this option. 4858 type: "boolean" 4859 example: true 4860 Official: 4861 description: | 4862 Indicates whether this is an official registry (i.e., Docker Hub / docker.io) 4863 type: "boolean" 4864 example: true 4865 4866 Runtime: 4867 description: | 4868 Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) 4869 runtime. 4870 4871 The runtime is invoked by the daemon via the `containerd` daemon. OCI 4872 runtimes act as an interface to the Linux kernel namespaces, cgroups, 4873 and SELinux. 4874 type: "object" 4875 properties: 4876 path: 4877 description: | 4878 Name and, optional, path, of the OCI executable binary. 4879 4880 If the path is omitted, the daemon searches the host's `$PATH` for the 4881 binary and uses the first result. 4882 type: "string" 4883 example: "/usr/local/bin/my-oci-runtime" 4884 runtimeArgs: 4885 description: | 4886 List of command-line arguments to pass to the runtime when invoked. 4887 type: "array" 4888 x-nullable: true 4889 items: 4890 type: "string" 4891 example: ["--debug", "--systemd-cgroup=false"] 4892 4893 Commit: 4894 description: | 4895 Commit holds the Git-commit (SHA1) that a binary was built from, as 4896 reported in the version-string of external tools, such as `containerd`, 4897 or `runC`. 4898 type: "object" 4899 properties: 4900 ID: 4901 description: "Actual commit ID of external tool." 4902 type: "string" 4903 example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" 4904 Expected: 4905 description: | 4906 Commit ID of external tool expected by dockerd as set at build time. 4907 type: "string" 4908 example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4" 4909 4910 SwarmInfo: 4911 description: | 4912 Represents generic information about swarm. 4913 type: "object" 4914 properties: 4915 NodeID: 4916 description: "Unique identifier of for this node in the swarm." 4917 type: "string" 4918 default: "" 4919 example: "k67qz4598weg5unwwffg6z1m1" 4920 NodeAddr: 4921 description: | 4922 IP address at which this node can be reached by other nodes in the 4923 swarm. 4924 type: "string" 4925 default: "" 4926 example: "10.0.0.46" 4927 LocalNodeState: 4928 $ref: "#/definitions/LocalNodeState" 4929 ControlAvailable: 4930 type: "boolean" 4931 default: false 4932 example: true 4933 Error: 4934 type: "string" 4935 default: "" 4936 RemoteManagers: 4937 description: | 4938 List of ID's and addresses of other managers in the swarm. 4939 type: "array" 4940 default: null 4941 x-nullable: true 4942 items: 4943 $ref: "#/definitions/PeerNode" 4944 example: 4945 - NodeID: "71izy0goik036k48jg985xnds" 4946 Addr: "10.0.0.158:2377" 4947 - NodeID: "79y6h1o4gv8n120drcprv5nmc" 4948 Addr: "10.0.0.159:2377" 4949 - NodeID: "k67qz4598weg5unwwffg6z1m1" 4950 Addr: "10.0.0.46:2377" 4951 Nodes: 4952 description: "Total number of nodes in the swarm." 4953 type: "integer" 4954 x-nullable: true 4955 example: 4 4956 Managers: 4957 description: "Total number of managers in the swarm." 4958 type: "integer" 4959 x-nullable: true 4960 example: 3 4961 Cluster: 4962 $ref: "#/definitions/ClusterInfo" 4963 4964 LocalNodeState: 4965 description: "Current local status of this node." 4966 type: "string" 4967 default: "" 4968 enum: 4969 - "" 4970 - "inactive" 4971 - "pending" 4972 - "active" 4973 - "error" 4974 - "locked" 4975 example: "active" 4976 4977 PeerNode: 4978 description: "Represents a peer-node in the swarm" 4979 properties: 4980 NodeID: 4981 description: "Unique identifier of for this node in the swarm." 4982 type: "string" 4983 Addr: 4984 description: | 4985 IP address and ports at which this node can be reached. 4986 type: "string" 4987 4988 NetworkAttachmentConfig: 4989 description: | 4990 Specifies how a service should be attached to a particular network. 4991 type: "object" 4992 properties: 4993 Target: 4994 description: | 4995 The target network for attachment. Must be a network name or ID. 4996 type: "string" 4997 Aliases: 4998 description: | 4999 Discoverable alternate names for the service on this network. 5000 type: "array" 5001 items: 5002 type: "string" 5003 DriverOpts: 5004 description: | 5005 Driver attachment options for the network target. 5006 type: "object" 5007 additionalProperties: 5008 type: "string" 5009 5010 paths: 5011 /containers/json: 5012 get: 5013 summary: "List containers" 5014 description: | 5015 Returns a list of containers. For details on the format, see the 5016 [inspect endpoint](#operation/ContainerInspect). 5017 5018 Note that it uses a different, smaller representation of a container 5019 than inspecting a single container. For example, the list of linked 5020 containers is not propagated . 5021 operationId: "ContainerList" 5022 produces: 5023 - "application/json" 5024 parameters: 5025 - name: "all" 5026 in: "query" 5027 description: | 5028 Return all containers. By default, only running containers are shown. 5029 type: "boolean" 5030 default: false 5031 - name: "limit" 5032 in: "query" 5033 description: | 5034 Return this number of most recently created containers, including 5035 non-running ones. 5036 type: "integer" 5037 - name: "size" 5038 in: "query" 5039 description: | 5040 Return the size of container as fields `SizeRw` and `SizeRootFs`. 5041 type: "boolean" 5042 default: false 5043 - name: "filters" 5044 in: "query" 5045 description: | 5046 Filters to process on the container list, encoded as JSON (a 5047 `map[string][]string`). For example, `{"status": ["paused"]}` will 5048 only return paused containers. 5049 5050 Available filters: 5051 5052 - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`) 5053 - `before`=(`<container id>` or `<container name>`) 5054 - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 5055 - `exited=<int>` containers with exit code of `<int>` 5056 - `health`=(`starting`|`healthy`|`unhealthy`|`none`) 5057 - `id=<ID>` a container's ID 5058 - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) 5059 - `is-task=`(`true`|`false`) 5060 - `label=key` or `label="key=value"` of a container label 5061 - `name=<name>` a container's name 5062 - `network`=(`<network id>` or `<network name>`) 5063 - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 5064 - `since`=(`<container id>` or `<container name>`) 5065 - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) 5066 - `volume`=(`<volume name>` or `<mount point destination>`) 5067 type: "string" 5068 responses: 5069 200: 5070 description: "no error" 5071 schema: 5072 $ref: "#/definitions/ContainerSummary" 5073 examples: 5074 application/json: 5075 - Id: "8dfafdbc3a40" 5076 Names: 5077 - "/boring_feynman" 5078 Image: "ubuntu:latest" 5079 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5080 Command: "echo 1" 5081 Created: 1367854155 5082 State: "Exited" 5083 Status: "Exit 0" 5084 Ports: 5085 - PrivatePort: 2222 5086 PublicPort: 3333 5087 Type: "tcp" 5088 Labels: 5089 com.example.vendor: "Acme" 5090 com.example.license: "GPL" 5091 com.example.version: "1.0" 5092 SizeRw: 12288 5093 SizeRootFs: 0 5094 HostConfig: 5095 NetworkMode: "default" 5096 NetworkSettings: 5097 Networks: 5098 bridge: 5099 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5100 EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" 5101 Gateway: "172.17.0.1" 5102 IPAddress: "172.17.0.2" 5103 IPPrefixLen: 16 5104 IPv6Gateway: "" 5105 GlobalIPv6Address: "" 5106 GlobalIPv6PrefixLen: 0 5107 MacAddress: "02:42:ac:11:00:02" 5108 Mounts: 5109 - Name: "fac362...80535" 5110 Source: "/data" 5111 Destination: "/data" 5112 Driver: "local" 5113 Mode: "ro,Z" 5114 RW: false 5115 Propagation: "" 5116 - Id: "9cd87474be90" 5117 Names: 5118 - "/coolName" 5119 Image: "ubuntu:latest" 5120 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5121 Command: "echo 222222" 5122 Created: 1367854155 5123 State: "Exited" 5124 Status: "Exit 0" 5125 Ports: [] 5126 Labels: {} 5127 SizeRw: 12288 5128 SizeRootFs: 0 5129 HostConfig: 5130 NetworkMode: "default" 5131 NetworkSettings: 5132 Networks: 5133 bridge: 5134 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5135 EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" 5136 Gateway: "172.17.0.1" 5137 IPAddress: "172.17.0.8" 5138 IPPrefixLen: 16 5139 IPv6Gateway: "" 5140 GlobalIPv6Address: "" 5141 GlobalIPv6PrefixLen: 0 5142 MacAddress: "02:42:ac:11:00:08" 5143 Mounts: [] 5144 - Id: "3176a2479c92" 5145 Names: 5146 - "/sleepy_dog" 5147 Image: "ubuntu:latest" 5148 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5149 Command: "echo 3333333333333333" 5150 Created: 1367854154 5151 State: "Exited" 5152 Status: "Exit 0" 5153 Ports: [] 5154 Labels: {} 5155 SizeRw: 12288 5156 SizeRootFs: 0 5157 HostConfig: 5158 NetworkMode: "default" 5159 NetworkSettings: 5160 Networks: 5161 bridge: 5162 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5163 EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" 5164 Gateway: "172.17.0.1" 5165 IPAddress: "172.17.0.6" 5166 IPPrefixLen: 16 5167 IPv6Gateway: "" 5168 GlobalIPv6Address: "" 5169 GlobalIPv6PrefixLen: 0 5170 MacAddress: "02:42:ac:11:00:06" 5171 Mounts: [] 5172 - Id: "4cb07b47f9fb" 5173 Names: 5174 - "/running_cat" 5175 Image: "ubuntu:latest" 5176 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 5177 Command: "echo 444444444444444444444444444444444" 5178 Created: 1367854152 5179 State: "Exited" 5180 Status: "Exit 0" 5181 Ports: [] 5182 Labels: {} 5183 SizeRw: 12288 5184 SizeRootFs: 0 5185 HostConfig: 5186 NetworkMode: "default" 5187 NetworkSettings: 5188 Networks: 5189 bridge: 5190 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5191 EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" 5192 Gateway: "172.17.0.1" 5193 IPAddress: "172.17.0.5" 5194 IPPrefixLen: 16 5195 IPv6Gateway: "" 5196 GlobalIPv6Address: "" 5197 GlobalIPv6PrefixLen: 0 5198 MacAddress: "02:42:ac:11:00:05" 5199 Mounts: [] 5200 400: 5201 description: "bad parameter" 5202 schema: 5203 $ref: "#/definitions/ErrorResponse" 5204 500: 5205 description: "server error" 5206 schema: 5207 $ref: "#/definitions/ErrorResponse" 5208 tags: ["Container"] 5209 /containers/create: 5210 post: 5211 summary: "Create a container" 5212 operationId: "ContainerCreate" 5213 consumes: 5214 - "application/json" 5215 - "application/octet-stream" 5216 produces: 5217 - "application/json" 5218 parameters: 5219 - name: "name" 5220 in: "query" 5221 description: | 5222 Assign the specified name to the container. Must match 5223 `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. 5224 type: "string" 5225 pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$" 5226 - name: "body" 5227 in: "body" 5228 description: "Container to create" 5229 schema: 5230 allOf: 5231 - $ref: "#/definitions/ContainerConfig" 5232 - type: "object" 5233 properties: 5234 HostConfig: 5235 $ref: "#/definitions/HostConfig" 5236 NetworkingConfig: 5237 description: "This container's networking configuration." 5238 type: "object" 5239 properties: 5240 EndpointsConfig: 5241 description: | 5242 A mapping of network name to endpoint configuration 5243 for that network. 5244 type: "object" 5245 additionalProperties: 5246 $ref: "#/definitions/EndpointSettings" 5247 example: 5248 Hostname: "" 5249 Domainname: "" 5250 User: "" 5251 AttachStdin: false 5252 AttachStdout: true 5253 AttachStderr: true 5254 Tty: false 5255 OpenStdin: false 5256 StdinOnce: false 5257 Env: 5258 - "FOO=bar" 5259 - "BAZ=quux" 5260 Cmd: 5261 - "date" 5262 Entrypoint: "" 5263 Image: "ubuntu" 5264 Labels: 5265 com.example.vendor: "Acme" 5266 com.example.license: "GPL" 5267 com.example.version: "1.0" 5268 Volumes: 5269 /volumes/data: {} 5270 WorkingDir: "" 5271 NetworkDisabled: false 5272 MacAddress: "12:34:56:78:9a:bc" 5273 ExposedPorts: 5274 22/tcp: {} 5275 StopSignal: "SIGTERM" 5276 StopTimeout: 10 5277 HostConfig: 5278 Binds: 5279 - "/tmp:/tmp" 5280 Links: 5281 - "redis3:redis" 5282 Memory: 0 5283 MemorySwap: 0 5284 MemoryReservation: 0 5285 KernelMemory: 0 5286 NanoCPUs: 500000 5287 CpuPercent: 80 5288 CpuShares: 512 5289 CpuPeriod: 100000 5290 CpuRealtimePeriod: 1000000 5291 CpuRealtimeRuntime: 10000 5292 CpuQuota: 50000 5293 CpusetCpus: "0,1" 5294 CpusetMems: "0,1" 5295 MaximumIOps: 0 5296 MaximumIOBps: 0 5297 BlkioWeight: 300 5298 BlkioWeightDevice: 5299 - {} 5300 BlkioDeviceReadBps: 5301 - {} 5302 BlkioDeviceReadIOps: 5303 - {} 5304 BlkioDeviceWriteBps: 5305 - {} 5306 BlkioDeviceWriteIOps: 5307 - {} 5308 MemorySwappiness: 60 5309 OomKillDisable: false 5310 OomScoreAdj: 500 5311 PidMode: "" 5312 PidsLimit: 0 5313 PortBindings: 5314 22/tcp: 5315 - HostPort: "11022" 5316 PublishAllPorts: false 5317 Privileged: false 5318 ReadonlyRootfs: false 5319 Dns: 5320 - "8.8.8.8" 5321 DnsOptions: 5322 - "" 5323 DnsSearch: 5324 - "" 5325 VolumesFrom: 5326 - "parent" 5327 - "other:ro" 5328 CapAdd: 5329 - "NET_ADMIN" 5330 CapDrop: 5331 - "MKNOD" 5332 GroupAdd: 5333 - "newgroup" 5334 RestartPolicy: 5335 Name: "" 5336 MaximumRetryCount: 0 5337 AutoRemove: true 5338 NetworkMode: "bridge" 5339 Devices: [] 5340 Ulimits: 5341 - {} 5342 LogConfig: 5343 Type: "json-file" 5344 Config: {} 5345 SecurityOpt: [] 5346 StorageOpt: {} 5347 CgroupParent: "" 5348 VolumeDriver: "" 5349 ShmSize: 67108864 5350 NetworkingConfig: 5351 EndpointsConfig: 5352 isolated_nw: 5353 IPAMConfig: 5354 IPv4Address: "172.20.30.33" 5355 IPv6Address: "2001:db8:abcd::3033" 5356 LinkLocalIPs: 5357 - "169.254.34.68" 5358 - "fe80::3468" 5359 Links: 5360 - "container_1" 5361 - "container_2" 5362 Aliases: 5363 - "server_x" 5364 - "server_y" 5365 5366 required: true 5367 responses: 5368 201: 5369 description: "Container created successfully" 5370 schema: 5371 type: "object" 5372 title: "ContainerCreateResponse" 5373 description: "OK response to ContainerCreate operation" 5374 required: [Id, Warnings] 5375 properties: 5376 Id: 5377 description: "The ID of the created container" 5378 type: "string" 5379 x-nullable: false 5380 Warnings: 5381 description: "Warnings encountered when creating the container" 5382 type: "array" 5383 x-nullable: false 5384 items: 5385 type: "string" 5386 examples: 5387 application/json: 5388 Id: "e90e34656806" 5389 Warnings: [] 5390 400: 5391 description: "bad parameter" 5392 schema: 5393 $ref: "#/definitions/ErrorResponse" 5394 404: 5395 description: "no such container" 5396 schema: 5397 $ref: "#/definitions/ErrorResponse" 5398 examples: 5399 application/json: 5400 message: "No such container: c2ada9df5af8" 5401 409: 5402 description: "conflict" 5403 schema: 5404 $ref: "#/definitions/ErrorResponse" 5405 500: 5406 description: "server error" 5407 schema: 5408 $ref: "#/definitions/ErrorResponse" 5409 tags: ["Container"] 5410 /containers/{id}/json: 5411 get: 5412 summary: "Inspect a container" 5413 description: "Return low-level information about a container." 5414 operationId: "ContainerInspect" 5415 produces: 5416 - "application/json" 5417 responses: 5418 200: 5419 description: "no error" 5420 schema: 5421 type: "object" 5422 title: "ContainerInspectResponse" 5423 properties: 5424 Id: 5425 description: "The ID of the container" 5426 type: "string" 5427 Created: 5428 description: "The time the container was created" 5429 type: "string" 5430 Path: 5431 description: "The path to the command being run" 5432 type: "string" 5433 Args: 5434 description: "The arguments to the command being run" 5435 type: "array" 5436 items: 5437 type: "string" 5438 State: 5439 x-nullable: true 5440 $ref: "#/definitions/ContainerState" 5441 Image: 5442 description: "The container's image ID" 5443 type: "string" 5444 ResolvConfPath: 5445 type: "string" 5446 HostnamePath: 5447 type: "string" 5448 HostsPath: 5449 type: "string" 5450 LogPath: 5451 type: "string" 5452 Name: 5453 type: "string" 5454 RestartCount: 5455 type: "integer" 5456 Driver: 5457 type: "string" 5458 Platform: 5459 type: "string" 5460 MountLabel: 5461 type: "string" 5462 ProcessLabel: 5463 type: "string" 5464 AppArmorProfile: 5465 type: "string" 5466 ExecIDs: 5467 description: "IDs of exec instances that are running in the container." 5468 type: "array" 5469 items: 5470 type: "string" 5471 x-nullable: true 5472 HostConfig: 5473 $ref: "#/definitions/HostConfig" 5474 GraphDriver: 5475 $ref: "#/definitions/GraphDriverData" 5476 SizeRw: 5477 description: | 5478 The size of files that have been created or changed by this 5479 container. 5480 type: "integer" 5481 format: "int64" 5482 SizeRootFs: 5483 description: "The total size of all the files in this container." 5484 type: "integer" 5485 format: "int64" 5486 Mounts: 5487 type: "array" 5488 items: 5489 $ref: "#/definitions/MountPoint" 5490 Config: 5491 $ref: "#/definitions/ContainerConfig" 5492 NetworkSettings: 5493 $ref: "#/definitions/NetworkSettings" 5494 examples: 5495 application/json: 5496 AppArmorProfile: "" 5497 Args: 5498 - "-c" 5499 - "exit 9" 5500 Config: 5501 AttachStderr: true 5502 AttachStdin: false 5503 AttachStdout: true 5504 Cmd: 5505 - "/bin/sh" 5506 - "-c" 5507 - "exit 9" 5508 Domainname: "" 5509 Env: 5510 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 5511 Healthcheck: 5512 Test: ["CMD-SHELL", "exit 0"] 5513 Hostname: "ba033ac44011" 5514 Image: "ubuntu" 5515 Labels: 5516 com.example.vendor: "Acme" 5517 com.example.license: "GPL" 5518 com.example.version: "1.0" 5519 MacAddress: "" 5520 NetworkDisabled: false 5521 OpenStdin: false 5522 StdinOnce: false 5523 Tty: false 5524 User: "" 5525 Volumes: 5526 /volumes/data: {} 5527 WorkingDir: "" 5528 StopSignal: "SIGTERM" 5529 StopTimeout: 10 5530 Created: "2015-01-06T15:47:31.485331387Z" 5531 Driver: "devicemapper" 5532 ExecIDs: 5533 - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca" 5534 - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4" 5535 HostConfig: 5536 MaximumIOps: 0 5537 MaximumIOBps: 0 5538 BlkioWeight: 0 5539 BlkioWeightDevice: 5540 - {} 5541 BlkioDeviceReadBps: 5542 - {} 5543 BlkioDeviceWriteBps: 5544 - {} 5545 BlkioDeviceReadIOps: 5546 - {} 5547 BlkioDeviceWriteIOps: 5548 - {} 5549 ContainerIDFile: "" 5550 CpusetCpus: "" 5551 CpusetMems: "" 5552 CpuPercent: 80 5553 CpuShares: 0 5554 CpuPeriod: 100000 5555 CpuRealtimePeriod: 1000000 5556 CpuRealtimeRuntime: 10000 5557 Devices: [] 5558 IpcMode: "" 5559 LxcConf: [] 5560 Memory: 0 5561 MemorySwap: 0 5562 MemoryReservation: 0 5563 KernelMemory: 0 5564 OomKillDisable: false 5565 OomScoreAdj: 500 5566 NetworkMode: "bridge" 5567 PidMode: "" 5568 PortBindings: {} 5569 Privileged: false 5570 ReadonlyRootfs: false 5571 PublishAllPorts: false 5572 RestartPolicy: 5573 MaximumRetryCount: 2 5574 Name: "on-failure" 5575 LogConfig: 5576 Type: "json-file" 5577 Sysctls: 5578 net.ipv4.ip_forward: "1" 5579 Ulimits: 5580 - {} 5581 VolumeDriver: "" 5582 ShmSize: 67108864 5583 HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" 5584 HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" 5585 LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" 5586 Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" 5587 Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" 5588 MountLabel: "" 5589 Name: "/boring_euclid" 5590 NetworkSettings: 5591 Bridge: "" 5592 SandboxID: "" 5593 HairpinMode: false 5594 LinkLocalIPv6Address: "" 5595 LinkLocalIPv6PrefixLen: 0 5596 SandboxKey: "" 5597 EndpointID: "" 5598 Gateway: "" 5599 GlobalIPv6Address: "" 5600 GlobalIPv6PrefixLen: 0 5601 IPAddress: "" 5602 IPPrefixLen: 0 5603 IPv6Gateway: "" 5604 MacAddress: "" 5605 Networks: 5606 bridge: 5607 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 5608 EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" 5609 Gateway: "172.17.0.1" 5610 IPAddress: "172.17.0.2" 5611 IPPrefixLen: 16 5612 IPv6Gateway: "" 5613 GlobalIPv6Address: "" 5614 GlobalIPv6PrefixLen: 0 5615 MacAddress: "02:42:ac:12:00:02" 5616 Path: "/bin/sh" 5617 ProcessLabel: "" 5618 ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" 5619 RestartCount: 1 5620 State: 5621 Error: "" 5622 ExitCode: 9 5623 FinishedAt: "2015-01-06T15:47:32.080254511Z" 5624 Health: 5625 Status: "healthy" 5626 FailingStreak: 0 5627 Log: 5628 - Start: "2019-12-22T10:59:05.6385933Z" 5629 End: "2019-12-22T10:59:05.8078452Z" 5630 ExitCode: 0 5631 Output: "" 5632 OOMKilled: false 5633 Dead: false 5634 Paused: false 5635 Pid: 0 5636 Restarting: false 5637 Running: true 5638 StartedAt: "2015-01-06T15:47:32.072697474Z" 5639 Status: "running" 5640 Mounts: 5641 - Name: "fac362...80535" 5642 Source: "/data" 5643 Destination: "/data" 5644 Driver: "local" 5645 Mode: "ro,Z" 5646 RW: false 5647 Propagation: "" 5648 404: 5649 description: "no such container" 5650 schema: 5651 $ref: "#/definitions/ErrorResponse" 5652 examples: 5653 application/json: 5654 message: "No such container: c2ada9df5af8" 5655 500: 5656 description: "server error" 5657 schema: 5658 $ref: "#/definitions/ErrorResponse" 5659 parameters: 5660 - name: "id" 5661 in: "path" 5662 required: true 5663 description: "ID or name of the container" 5664 type: "string" 5665 - name: "size" 5666 in: "query" 5667 type: "boolean" 5668 default: false 5669 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" 5670 tags: ["Container"] 5671 /containers/{id}/top: 5672 get: 5673 summary: "List processes running inside a container" 5674 description: | 5675 On Unix systems, this is done by running the `ps` command. This endpoint 5676 is not supported on Windows. 5677 operationId: "ContainerTop" 5678 responses: 5679 200: 5680 description: "no error" 5681 schema: 5682 type: "object" 5683 title: "ContainerTopResponse" 5684 description: "OK response to ContainerTop operation" 5685 properties: 5686 Titles: 5687 description: "The ps column titles" 5688 type: "array" 5689 items: 5690 type: "string" 5691 Processes: 5692 description: | 5693 Each process running in the container, where each is process 5694 is an array of values corresponding to the titles. 5695 type: "array" 5696 items: 5697 type: "array" 5698 items: 5699 type: "string" 5700 examples: 5701 application/json: 5702 Titles: 5703 - "UID" 5704 - "PID" 5705 - "PPID" 5706 - "C" 5707 - "STIME" 5708 - "TTY" 5709 - "TIME" 5710 - "CMD" 5711 Processes: 5712 - 5713 - "root" 5714 - "13642" 5715 - "882" 5716 - "0" 5717 - "17:03" 5718 - "pts/0" 5719 - "00:00:00" 5720 - "/bin/bash" 5721 - 5722 - "root" 5723 - "13735" 5724 - "13642" 5725 - "0" 5726 - "17:06" 5727 - "pts/0" 5728 - "00:00:00" 5729 - "sleep 10" 5730 404: 5731 description: "no such container" 5732 schema: 5733 $ref: "#/definitions/ErrorResponse" 5734 examples: 5735 application/json: 5736 message: "No such container: c2ada9df5af8" 5737 500: 5738 description: "server error" 5739 schema: 5740 $ref: "#/definitions/ErrorResponse" 5741 parameters: 5742 - name: "id" 5743 in: "path" 5744 required: true 5745 description: "ID or name of the container" 5746 type: "string" 5747 - name: "ps_args" 5748 in: "query" 5749 description: "The arguments to pass to `ps`. For example, `aux`" 5750 type: "string" 5751 default: "-ef" 5752 tags: ["Container"] 5753 /containers/{id}/logs: 5754 get: 5755 summary: "Get container logs" 5756 description: | 5757 Get `stdout` and `stderr` logs from a container. 5758 5759 Note: This endpoint works only for containers with the `json-file` or 5760 `journald` logging driver. 5761 operationId: "ContainerLogs" 5762 responses: 5763 200: 5764 description: | 5765 logs returned as a stream in response body. 5766 For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). 5767 Note that unlike the attach endpoint, the logs endpoint does not 5768 upgrade the connection and does not set Content-Type. 5769 schema: 5770 type: "string" 5771 format: "binary" 5772 404: 5773 description: "no such container" 5774 schema: 5775 $ref: "#/definitions/ErrorResponse" 5776 examples: 5777 application/json: 5778 message: "No such container: c2ada9df5af8" 5779 500: 5780 description: "server error" 5781 schema: 5782 $ref: "#/definitions/ErrorResponse" 5783 parameters: 5784 - name: "id" 5785 in: "path" 5786 required: true 5787 description: "ID or name of the container" 5788 type: "string" 5789 - name: "follow" 5790 in: "query" 5791 description: "Keep connection after returning logs." 5792 type: "boolean" 5793 default: false 5794 - name: "stdout" 5795 in: "query" 5796 description: "Return logs from `stdout`" 5797 type: "boolean" 5798 default: false 5799 - name: "stderr" 5800 in: "query" 5801 description: "Return logs from `stderr`" 5802 type: "boolean" 5803 default: false 5804 - name: "since" 5805 in: "query" 5806 description: "Only return logs since this time, as a UNIX timestamp" 5807 type: "integer" 5808 default: 0 5809 - name: "until" 5810 in: "query" 5811 description: "Only return logs before this time, as a UNIX timestamp" 5812 type: "integer" 5813 default: 0 5814 - name: "timestamps" 5815 in: "query" 5816 description: "Add timestamps to every log line" 5817 type: "boolean" 5818 default: false 5819 - name: "tail" 5820 in: "query" 5821 description: | 5822 Only return this number of log lines from the end of the logs. 5823 Specify as an integer or `all` to output all log lines. 5824 type: "string" 5825 default: "all" 5826 tags: ["Container"] 5827 /containers/{id}/changes: 5828 get: 5829 summary: "Get changes on a container’s filesystem" 5830 description: | 5831 Returns which files in a container's filesystem have been added, deleted, 5832 or modified. The `Kind` of modification can be one of: 5833 5834 - `0`: Modified 5835 - `1`: Added 5836 - `2`: Deleted 5837 operationId: "ContainerChanges" 5838 produces: ["application/json"] 5839 responses: 5840 200: 5841 description: "The list of changes" 5842 schema: 5843 type: "array" 5844 items: 5845 type: "object" 5846 x-go-name: "ContainerChangeResponseItem" 5847 title: "ContainerChangeResponseItem" 5848 description: "change item in response to ContainerChanges operation" 5849 required: [Path, Kind] 5850 properties: 5851 Path: 5852 description: "Path to file that has changed" 5853 type: "string" 5854 x-nullable: false 5855 Kind: 5856 description: "Kind of change" 5857 type: "integer" 5858 format: "uint8" 5859 enum: [0, 1, 2] 5860 x-nullable: false 5861 examples: 5862 application/json: 5863 - Path: "/dev" 5864 Kind: 0 5865 - Path: "/dev/kmsg" 5866 Kind: 1 5867 - Path: "/test" 5868 Kind: 1 5869 404: 5870 description: "no such container" 5871 schema: 5872 $ref: "#/definitions/ErrorResponse" 5873 examples: 5874 application/json: 5875 message: "No such container: c2ada9df5af8" 5876 500: 5877 description: "server error" 5878 schema: 5879 $ref: "#/definitions/ErrorResponse" 5880 parameters: 5881 - name: "id" 5882 in: "path" 5883 required: true 5884 description: "ID or name of the container" 5885 type: "string" 5886 tags: ["Container"] 5887 /containers/{id}/export: 5888 get: 5889 summary: "Export a container" 5890 description: "Export the contents of a container as a tarball." 5891 operationId: "ContainerExport" 5892 produces: 5893 - "application/octet-stream" 5894 responses: 5895 200: 5896 description: "no error" 5897 404: 5898 description: "no such container" 5899 schema: 5900 $ref: "#/definitions/ErrorResponse" 5901 examples: 5902 application/json: 5903 message: "No such container: c2ada9df5af8" 5904 500: 5905 description: "server error" 5906 schema: 5907 $ref: "#/definitions/ErrorResponse" 5908 parameters: 5909 - name: "id" 5910 in: "path" 5911 required: true 5912 description: "ID or name of the container" 5913 type: "string" 5914 tags: ["Container"] 5915 /containers/{id}/stats: 5916 get: 5917 summary: "Get container stats based on resource usage" 5918 description: | 5919 This endpoint returns a live stream of a container’s resource usage 5920 statistics. 5921 5922 The `precpu_stats` is the CPU statistic of the *previous* read, and is 5923 used to calculate the CPU usage percentage. It is not an exact copy 5924 of the `cpu_stats` field. 5925 5926 If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is 5927 nil then for compatibility with older daemons the length of the 5928 corresponding `cpu_usage.percpu_usage` array should be used. 5929 5930 On a cgroup v2 host, the following fields are not set 5931 * `blkio_stats`: all fields other than `io_service_bytes_recursive` 5932 * `cpu_stats`: `cpu_usage.percpu_usage` 5933 * `memory_stats`: `max_usage` and `failcnt` 5934 Also, `memory_stats.stats` fields are incompatible with cgroup v1. 5935 operationId: "ContainerStats" 5936 produces: ["application/json"] 5937 responses: 5938 200: 5939 description: "no error" 5940 schema: 5941 type: "object" 5942 examples: 5943 application/json: 5944 read: "2015-01-08T22:57:31.547920715Z" 5945 pids_stats: 5946 current: 3 5947 networks: 5948 eth0: 5949 rx_bytes: 5338 5950 rx_dropped: 0 5951 rx_errors: 0 5952 rx_packets: 36 5953 tx_bytes: 648 5954 tx_dropped: 0 5955 tx_errors: 0 5956 tx_packets: 8 5957 eth5: 5958 rx_bytes: 4641 5959 rx_dropped: 0 5960 rx_errors: 0 5961 rx_packets: 26 5962 tx_bytes: 690 5963 tx_dropped: 0 5964 tx_errors: 0 5965 tx_packets: 9 5966 memory_stats: 5967 stats: 5968 total_pgmajfault: 0 5969 cache: 0 5970 mapped_file: 0 5971 total_inactive_file: 0 5972 pgpgout: 414 5973 rss: 6537216 5974 total_mapped_file: 0 5975 writeback: 0 5976 unevictable: 0 5977 pgpgin: 477 5978 total_unevictable: 0 5979 pgmajfault: 0 5980 total_rss: 6537216 5981 total_rss_huge: 6291456 5982 total_writeback: 0 5983 total_inactive_anon: 0 5984 rss_huge: 6291456 5985 hierarchical_memory_limit: 67108864 5986 total_pgfault: 964 5987 total_active_file: 0 5988 active_anon: 6537216 5989 total_active_anon: 6537216 5990 total_pgpgout: 414 5991 total_cache: 0 5992 inactive_anon: 0 5993 active_file: 0 5994 pgfault: 964 5995 inactive_file: 0 5996 total_pgpgin: 477 5997 max_usage: 6651904 5998 usage: 6537216 5999 failcnt: 0 6000 limit: 67108864 6001 blkio_stats: {} 6002 cpu_stats: 6003 cpu_usage: 6004 percpu_usage: 6005 - 8646879 6006 - 24472255 6007 - 36438778 6008 - 30657443 6009 usage_in_usermode: 50000000 6010 total_usage: 100215355 6011 usage_in_kernelmode: 30000000 6012 system_cpu_usage: 739306590000000 6013 online_cpus: 4 6014 throttling_data: 6015 periods: 0 6016 throttled_periods: 0 6017 throttled_time: 0 6018 precpu_stats: 6019 cpu_usage: 6020 percpu_usage: 6021 - 8646879 6022 - 24350896 6023 - 36438778 6024 - 30657443 6025 usage_in_usermode: 50000000 6026 total_usage: 100093996 6027 usage_in_kernelmode: 30000000 6028 system_cpu_usage: 9492140000000 6029 online_cpus: 4 6030 throttling_data: 6031 periods: 0 6032 throttled_periods: 0 6033 throttled_time: 0 6034 404: 6035 description: "no such container" 6036 schema: 6037 $ref: "#/definitions/ErrorResponse" 6038 examples: 6039 application/json: 6040 message: "No such container: c2ada9df5af8" 6041 500: 6042 description: "server error" 6043 schema: 6044 $ref: "#/definitions/ErrorResponse" 6045 parameters: 6046 - name: "id" 6047 in: "path" 6048 required: true 6049 description: "ID or name of the container" 6050 type: "string" 6051 - name: "stream" 6052 in: "query" 6053 description: | 6054 Stream the output. If false, the stats will be output once and then 6055 it will disconnect. 6056 type: "boolean" 6057 default: true 6058 - name: "one-shot" 6059 in: "query" 6060 description: | 6061 Only get a single stat instead of waiting for 2 cycles. Must be used 6062 with `stream=false`. 6063 type: "boolean" 6064 default: false 6065 tags: ["Container"] 6066 /containers/{id}/resize: 6067 post: 6068 summary: "Resize a container TTY" 6069 description: "Resize the TTY for a container." 6070 operationId: "ContainerResize" 6071 consumes: 6072 - "application/octet-stream" 6073 produces: 6074 - "text/plain" 6075 responses: 6076 200: 6077 description: "no error" 6078 404: 6079 description: "no such container" 6080 schema: 6081 $ref: "#/definitions/ErrorResponse" 6082 examples: 6083 application/json: 6084 message: "No such container: c2ada9df5af8" 6085 500: 6086 description: "cannot resize container" 6087 schema: 6088 $ref: "#/definitions/ErrorResponse" 6089 parameters: 6090 - name: "id" 6091 in: "path" 6092 required: true 6093 description: "ID or name of the container" 6094 type: "string" 6095 - name: "h" 6096 in: "query" 6097 description: "Height of the TTY session in characters" 6098 type: "integer" 6099 - name: "w" 6100 in: "query" 6101 description: "Width of the TTY session in characters" 6102 type: "integer" 6103 tags: ["Container"] 6104 /containers/{id}/start: 6105 post: 6106 summary: "Start a container" 6107 operationId: "ContainerStart" 6108 responses: 6109 204: 6110 description: "no error" 6111 304: 6112 description: "container already started" 6113 404: 6114 description: "no such container" 6115 schema: 6116 $ref: "#/definitions/ErrorResponse" 6117 examples: 6118 application/json: 6119 message: "No such container: c2ada9df5af8" 6120 500: 6121 description: "server error" 6122 schema: 6123 $ref: "#/definitions/ErrorResponse" 6124 parameters: 6125 - name: "id" 6126 in: "path" 6127 required: true 6128 description: "ID or name of the container" 6129 type: "string" 6130 - name: "detachKeys" 6131 in: "query" 6132 description: | 6133 Override the key sequence for detaching a container. Format is a 6134 single character `[a-Z]` or `ctrl-<value>` where `<value>` is one 6135 of: `a-z`, `@`, `^`, `[`, `,` or `_`. 6136 type: "string" 6137 tags: ["Container"] 6138 /containers/{id}/stop: 6139 post: 6140 summary: "Stop a container" 6141 operationId: "ContainerStop" 6142 responses: 6143 204: 6144 description: "no error" 6145 304: 6146 description: "container already stopped" 6147 404: 6148 description: "no such container" 6149 schema: 6150 $ref: "#/definitions/ErrorResponse" 6151 examples: 6152 application/json: 6153 message: "No such container: c2ada9df5af8" 6154 500: 6155 description: "server error" 6156 schema: 6157 $ref: "#/definitions/ErrorResponse" 6158 parameters: 6159 - name: "id" 6160 in: "path" 6161 required: true 6162 description: "ID or name of the container" 6163 type: "string" 6164 - name: "t" 6165 in: "query" 6166 description: "Number of seconds to wait before killing the container" 6167 type: "integer" 6168 tags: ["Container"] 6169 /containers/{id}/restart: 6170 post: 6171 summary: "Restart a container" 6172 operationId: "ContainerRestart" 6173 responses: 6174 204: 6175 description: "no error" 6176 404: 6177 description: "no such container" 6178 schema: 6179 $ref: "#/definitions/ErrorResponse" 6180 examples: 6181 application/json: 6182 message: "No such container: c2ada9df5af8" 6183 500: 6184 description: "server error" 6185 schema: 6186 $ref: "#/definitions/ErrorResponse" 6187 parameters: 6188 - name: "id" 6189 in: "path" 6190 required: true 6191 description: "ID or name of the container" 6192 type: "string" 6193 - name: "t" 6194 in: "query" 6195 description: "Number of seconds to wait before killing the container" 6196 type: "integer" 6197 tags: ["Container"] 6198 /containers/{id}/kill: 6199 post: 6200 summary: "Kill a container" 6201 description: | 6202 Send a POSIX signal to a container, defaulting to killing to the 6203 container. 6204 operationId: "ContainerKill" 6205 responses: 6206 204: 6207 description: "no error" 6208 404: 6209 description: "no such container" 6210 schema: 6211 $ref: "#/definitions/ErrorResponse" 6212 examples: 6213 application/json: 6214 message: "No such container: c2ada9df5af8" 6215 409: 6216 description: "container is not running" 6217 schema: 6218 $ref: "#/definitions/ErrorResponse" 6219 examples: 6220 application/json: 6221 message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" 6222 500: 6223 description: "server error" 6224 schema: 6225 $ref: "#/definitions/ErrorResponse" 6226 parameters: 6227 - name: "id" 6228 in: "path" 6229 required: true 6230 description: "ID or name of the container" 6231 type: "string" 6232 - name: "signal" 6233 in: "query" 6234 description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)" 6235 type: "string" 6236 default: "SIGKILL" 6237 tags: ["Container"] 6238 /containers/{id}/update: 6239 post: 6240 summary: "Update a container" 6241 description: | 6242 Change various configuration options of a container without having to 6243 recreate it. 6244 operationId: "ContainerUpdate" 6245 consumes: ["application/json"] 6246 produces: ["application/json"] 6247 responses: 6248 200: 6249 description: "The container has been updated." 6250 schema: 6251 type: "object" 6252 title: "ContainerUpdateResponse" 6253 description: "OK response to ContainerUpdate operation" 6254 properties: 6255 Warnings: 6256 type: "array" 6257 items: 6258 type: "string" 6259 404: 6260 description: "no such container" 6261 schema: 6262 $ref: "#/definitions/ErrorResponse" 6263 examples: 6264 application/json: 6265 message: "No such container: c2ada9df5af8" 6266 500: 6267 description: "server error" 6268 schema: 6269 $ref: "#/definitions/ErrorResponse" 6270 parameters: 6271 - name: "id" 6272 in: "path" 6273 required: true 6274 description: "ID or name of the container" 6275 type: "string" 6276 - name: "update" 6277 in: "body" 6278 required: true 6279 schema: 6280 allOf: 6281 - $ref: "#/definitions/Resources" 6282 - type: "object" 6283 properties: 6284 RestartPolicy: 6285 $ref: "#/definitions/RestartPolicy" 6286 example: 6287 BlkioWeight: 300 6288 CpuShares: 512 6289 CpuPeriod: 100000 6290 CpuQuota: 50000 6291 CpuRealtimePeriod: 1000000 6292 CpuRealtimeRuntime: 10000 6293 CpusetCpus: "0,1" 6294 CpusetMems: "0" 6295 Memory: 314572800 6296 MemorySwap: 514288000 6297 MemoryReservation: 209715200 6298 KernelMemory: 52428800 6299 RestartPolicy: 6300 MaximumRetryCount: 4 6301 Name: "on-failure" 6302 tags: ["Container"] 6303 /containers/{id}/rename: 6304 post: 6305 summary: "Rename a container" 6306 operationId: "ContainerRename" 6307 responses: 6308 204: 6309 description: "no error" 6310 404: 6311 description: "no such container" 6312 schema: 6313 $ref: "#/definitions/ErrorResponse" 6314 examples: 6315 application/json: 6316 message: "No such container: c2ada9df5af8" 6317 409: 6318 description: "name already in use" 6319 schema: 6320 $ref: "#/definitions/ErrorResponse" 6321 500: 6322 description: "server error" 6323 schema: 6324 $ref: "#/definitions/ErrorResponse" 6325 parameters: 6326 - name: "id" 6327 in: "path" 6328 required: true 6329 description: "ID or name of the container" 6330 type: "string" 6331 - name: "name" 6332 in: "query" 6333 required: true 6334 description: "New name for the container" 6335 type: "string" 6336 tags: ["Container"] 6337 /containers/{id}/pause: 6338 post: 6339 summary: "Pause a container" 6340 description: | 6341 Use the freezer cgroup to suspend all processes in a container. 6342 6343 Traditionally, when suspending a process the `SIGSTOP` signal is used, 6344 which is observable by the process being suspended. With the freezer 6345 cgroup the process is unaware, and unable to capture, that it is being 6346 suspended, and subsequently resumed. 6347 operationId: "ContainerPause" 6348 responses: 6349 204: 6350 description: "no error" 6351 404: 6352 description: "no such container" 6353 schema: 6354 $ref: "#/definitions/ErrorResponse" 6355 examples: 6356 application/json: 6357 message: "No such container: c2ada9df5af8" 6358 500: 6359 description: "server error" 6360 schema: 6361 $ref: "#/definitions/ErrorResponse" 6362 parameters: 6363 - name: "id" 6364 in: "path" 6365 required: true 6366 description: "ID or name of the container" 6367 type: "string" 6368 tags: ["Container"] 6369 /containers/{id}/unpause: 6370 post: 6371 summary: "Unpause a container" 6372 description: "Resume a container which has been paused." 6373 operationId: "ContainerUnpause" 6374 responses: 6375 204: 6376 description: "no error" 6377 404: 6378 description: "no such container" 6379 schema: 6380 $ref: "#/definitions/ErrorResponse" 6381 examples: 6382 application/json: 6383 message: "No such container: c2ada9df5af8" 6384 500: 6385 description: "server error" 6386 schema: 6387 $ref: "#/definitions/ErrorResponse" 6388 parameters: 6389 - name: "id" 6390 in: "path" 6391 required: true 6392 description: "ID or name of the container" 6393 type: "string" 6394 tags: ["Container"] 6395 /containers/{id}/attach: 6396 post: 6397 summary: "Attach to a container" 6398 description: | 6399 Attach to a container to read its output or send it input. You can attach 6400 to the same container multiple times and you can reattach to containers 6401 that have been detached. 6402 6403 Either the `stream` or `logs` parameter must be `true` for this endpoint 6404 to do anything. 6405 6406 See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) 6407 for more details. 6408 6409 ### Hijacking 6410 6411 This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, 6412 and `stderr` on the same socket. 6413 6414 This is the response from the daemon for an attach request: 6415 6416 ``` 6417 HTTP/1.1 200 OK 6418 Content-Type: application/vnd.docker.raw-stream 6419 6420 [STREAM] 6421 ``` 6422 6423 After the headers and two new lines, the TCP connection can now be used 6424 for raw, bidirectional communication between the client and server. 6425 6426 To hint potential proxies about connection hijacking, the Docker client 6427 can also optionally send connection upgrade headers. 6428 6429 For example, the client sends this request to upgrade the connection: 6430 6431 ``` 6432 POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 6433 Upgrade: tcp 6434 Connection: Upgrade 6435 ``` 6436 6437 The Docker daemon will respond with a `101 UPGRADED` response, and will 6438 similarly follow with the raw stream: 6439 6440 ``` 6441 HTTP/1.1 101 UPGRADED 6442 Content-Type: application/vnd.docker.raw-stream 6443 Connection: Upgrade 6444 Upgrade: tcp 6445 6446 [STREAM] 6447 ``` 6448 6449 ### Stream format 6450 6451 When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), 6452 the stream over the hijacked connected is multiplexed to separate out 6453 `stdout` and `stderr`. The stream consists of a series of frames, each 6454 containing a header and a payload. 6455 6456 The header contains the information which the stream writes (`stdout` or 6457 `stderr`). It also contains the size of the associated frame encoded in 6458 the last four bytes (`uint32`). 6459 6460 It is encoded on the first eight bytes like this: 6461 6462 ```go 6463 header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} 6464 ``` 6465 6466 `STREAM_TYPE` can be: 6467 6468 - 0: `stdin` (is written on `stdout`) 6469 - 1: `stdout` 6470 - 2: `stderr` 6471 6472 `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size 6473 encoded as big endian. 6474 6475 Following the header is the payload, which is the specified number of 6476 bytes of `STREAM_TYPE`. 6477 6478 The simplest way to implement this protocol is the following: 6479 6480 1. Read 8 bytes. 6481 2. Choose `stdout` or `stderr` depending on the first byte. 6482 3. Extract the frame size from the last four bytes. 6483 4. Read the extracted size and output it on the correct output. 6484 5. Goto 1. 6485 6486 ### Stream format when using a TTY 6487 6488 When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), 6489 the stream is not multiplexed. The data exchanged over the hijacked 6490 connection is simply the raw data from the process PTY and client's 6491 `stdin`. 6492 6493 operationId: "ContainerAttach" 6494 produces: 6495 - "application/vnd.docker.raw-stream" 6496 responses: 6497 101: 6498 description: "no error, hints proxy about hijacking" 6499 200: 6500 description: "no error, no upgrade header found" 6501 400: 6502 description: "bad parameter" 6503 schema: 6504 $ref: "#/definitions/ErrorResponse" 6505 404: 6506 description: "no such container" 6507 schema: 6508 $ref: "#/definitions/ErrorResponse" 6509 examples: 6510 application/json: 6511 message: "No such container: c2ada9df5af8" 6512 500: 6513 description: "server error" 6514 schema: 6515 $ref: "#/definitions/ErrorResponse" 6516 parameters: 6517 - name: "id" 6518 in: "path" 6519 required: true 6520 description: "ID or name of the container" 6521 type: "string" 6522 - name: "detachKeys" 6523 in: "query" 6524 description: | 6525 Override the key sequence for detaching a container.Format is a single 6526 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 6527 `@`, `^`, `[`, `,` or `_`. 6528 type: "string" 6529 - name: "logs" 6530 in: "query" 6531 description: | 6532 Replay previous logs from the container. 6533 6534 This is useful for attaching to a container that has started and you 6535 want to output everything since the container started. 6536 6537 If `stream` is also enabled, once all the previous output has been 6538 returned, it will seamlessly transition into streaming current 6539 output. 6540 type: "boolean" 6541 default: false 6542 - name: "stream" 6543 in: "query" 6544 description: | 6545 Stream attached streams from the time the request was made onwards. 6546 type: "boolean" 6547 default: false 6548 - name: "stdin" 6549 in: "query" 6550 description: "Attach to `stdin`" 6551 type: "boolean" 6552 default: false 6553 - name: "stdout" 6554 in: "query" 6555 description: "Attach to `stdout`" 6556 type: "boolean" 6557 default: false 6558 - name: "stderr" 6559 in: "query" 6560 description: "Attach to `stderr`" 6561 type: "boolean" 6562 default: false 6563 tags: ["Container"] 6564 /containers/{id}/attach/ws: 6565 get: 6566 summary: "Attach to a container via a websocket" 6567 operationId: "ContainerAttachWebsocket" 6568 responses: 6569 101: 6570 description: "no error, hints proxy about hijacking" 6571 200: 6572 description: "no error, no upgrade header found" 6573 400: 6574 description: "bad parameter" 6575 schema: 6576 $ref: "#/definitions/ErrorResponse" 6577 404: 6578 description: "no such container" 6579 schema: 6580 $ref: "#/definitions/ErrorResponse" 6581 examples: 6582 application/json: 6583 message: "No such container: c2ada9df5af8" 6584 500: 6585 description: "server error" 6586 schema: 6587 $ref: "#/definitions/ErrorResponse" 6588 parameters: 6589 - name: "id" 6590 in: "path" 6591 required: true 6592 description: "ID or name of the container" 6593 type: "string" 6594 - name: "detachKeys" 6595 in: "query" 6596 description: | 6597 Override the key sequence for detaching a container.Format is a single 6598 character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, 6599 `@`, `^`, `[`, `,`, or `_`. 6600 type: "string" 6601 - name: "logs" 6602 in: "query" 6603 description: "Return logs" 6604 type: "boolean" 6605 default: false 6606 - name: "stream" 6607 in: "query" 6608 description: "Return stream" 6609 type: "boolean" 6610 default: false 6611 - name: "stdin" 6612 in: "query" 6613 description: "Attach to `stdin`" 6614 type: "boolean" 6615 default: false 6616 - name: "stdout" 6617 in: "query" 6618 description: "Attach to `stdout`" 6619 type: "boolean" 6620 default: false 6621 - name: "stderr" 6622 in: "query" 6623 description: "Attach to `stderr`" 6624 type: "boolean" 6625 default: false 6626 tags: ["Container"] 6627 /containers/{id}/wait: 6628 post: 6629 summary: "Wait for a container" 6630 description: "Block until a container stops, then returns the exit code." 6631 operationId: "ContainerWait" 6632 produces: ["application/json"] 6633 responses: 6634 200: 6635 description: "The container has exit." 6636 schema: 6637 type: "object" 6638 title: "ContainerWaitResponse" 6639 description: "OK response to ContainerWait operation" 6640 required: [StatusCode] 6641 properties: 6642 StatusCode: 6643 description: "Exit code of the container" 6644 type: "integer" 6645 x-nullable: false 6646 Error: 6647 description: "container waiting error, if any" 6648 type: "object" 6649 properties: 6650 Message: 6651 description: "Details of an error" 6652 type: "string" 6653 404: 6654 description: "no such container" 6655 schema: 6656 $ref: "#/definitions/ErrorResponse" 6657 examples: 6658 application/json: 6659 message: "No such container: c2ada9df5af8" 6660 500: 6661 description: "server error" 6662 schema: 6663 $ref: "#/definitions/ErrorResponse" 6664 parameters: 6665 - name: "id" 6666 in: "path" 6667 required: true 6668 description: "ID or name of the container" 6669 type: "string" 6670 - name: "condition" 6671 in: "query" 6672 description: | 6673 Wait until a container state reaches the given condition, either 6674 'not-running' (default), 'next-exit', or 'removed'. 6675 type: "string" 6676 default: "not-running" 6677 tags: ["Container"] 6678 /containers/{id}: 6679 delete: 6680 summary: "Remove a container" 6681 operationId: "ContainerDelete" 6682 responses: 6683 204: 6684 description: "no error" 6685 400: 6686 description: "bad parameter" 6687 schema: 6688 $ref: "#/definitions/ErrorResponse" 6689 404: 6690 description: "no such container" 6691 schema: 6692 $ref: "#/definitions/ErrorResponse" 6693 examples: 6694 application/json: 6695 message: "No such container: c2ada9df5af8" 6696 409: 6697 description: "conflict" 6698 schema: 6699 $ref: "#/definitions/ErrorResponse" 6700 examples: 6701 application/json: 6702 message: | 6703 You cannot remove a running container: c2ada9df5af8. Stop the 6704 container before attempting removal or force remove 6705 500: 6706 description: "server error" 6707 schema: 6708 $ref: "#/definitions/ErrorResponse" 6709 parameters: 6710 - name: "id" 6711 in: "path" 6712 required: true 6713 description: "ID or name of the container" 6714 type: "string" 6715 - name: "v" 6716 in: "query" 6717 description: "Remove the volumes associated with the container." 6718 type: "boolean" 6719 default: false 6720 - name: "force" 6721 in: "query" 6722 description: "If the container is running, kill it before removing it." 6723 type: "boolean" 6724 default: false 6725 - name: "link" 6726 in: "query" 6727 description: "Remove the specified link associated with the container." 6728 type: "boolean" 6729 default: false 6730 tags: ["Container"] 6731 /containers/{id}/archive: 6732 head: 6733 summary: "Get information about files in a container" 6734 description: | 6735 A response header `X-Docker-Container-Path-Stat` is returned, containing 6736 a base64 - encoded JSON object with some filesystem header information 6737 about the path. 6738 operationId: "ContainerArchiveInfo" 6739 responses: 6740 200: 6741 description: "no error" 6742 headers: 6743 X-Docker-Container-Path-Stat: 6744 type: "string" 6745 description: | 6746 A base64 - encoded JSON object with some filesystem header 6747 information about the path 6748 400: 6749 description: "Bad parameter" 6750 schema: 6751 allOf: 6752 - $ref: "#/definitions/ErrorResponse" 6753 - type: "object" 6754 properties: 6755 message: 6756 description: | 6757 The error message. Either "must specify path parameter" 6758 (path cannot be empty) or "not a directory" (path was 6759 asserted to be a directory but exists as a file). 6760 type: "string" 6761 x-nullable: false 6762 404: 6763 description: "Container or path does not exist" 6764 schema: 6765 $ref: "#/definitions/ErrorResponse" 6766 examples: 6767 application/json: 6768 message: "No such container: c2ada9df5af8" 6769 500: 6770 description: "Server error" 6771 schema: 6772 $ref: "#/definitions/ErrorResponse" 6773 parameters: 6774 - name: "id" 6775 in: "path" 6776 required: true 6777 description: "ID or name of the container" 6778 type: "string" 6779 - name: "path" 6780 in: "query" 6781 required: true 6782 description: "Resource in the container’s filesystem to archive." 6783 type: "string" 6784 tags: ["Container"] 6785 get: 6786 summary: "Get an archive of a filesystem resource in a container" 6787 description: "Get a tar archive of a resource in the filesystem of container id." 6788 operationId: "ContainerArchive" 6789 produces: ["application/x-tar"] 6790 responses: 6791 200: 6792 description: "no error" 6793 400: 6794 description: "Bad parameter" 6795 schema: 6796 allOf: 6797 - $ref: "#/definitions/ErrorResponse" 6798 - type: "object" 6799 properties: 6800 message: 6801 description: | 6802 The error message. Either "must specify path parameter" 6803 (path cannot be empty) or "not a directory" (path was 6804 asserted to be a directory but exists as a file). 6805 type: "string" 6806 x-nullable: false 6807 404: 6808 description: "Container or path does not exist" 6809 schema: 6810 $ref: "#/definitions/ErrorResponse" 6811 examples: 6812 application/json: 6813 message: "No such container: c2ada9df5af8" 6814 500: 6815 description: "server error" 6816 schema: 6817 $ref: "#/definitions/ErrorResponse" 6818 parameters: 6819 - name: "id" 6820 in: "path" 6821 required: true 6822 description: "ID or name of the container" 6823 type: "string" 6824 - name: "path" 6825 in: "query" 6826 required: true 6827 description: "Resource in the container’s filesystem to archive." 6828 type: "string" 6829 tags: ["Container"] 6830 put: 6831 summary: "Extract an archive of files or folders to a directory in a container" 6832 description: "Upload a tar archive to be extracted to a path in the filesystem of container id." 6833 operationId: "PutContainerArchive" 6834 consumes: ["application/x-tar", "application/octet-stream"] 6835 responses: 6836 200: 6837 description: "The content was extracted successfully" 6838 400: 6839 description: "Bad parameter" 6840 schema: 6841 $ref: "#/definitions/ErrorResponse" 6842 403: 6843 description: "Permission denied, the volume or container rootfs is marked as read-only." 6844 schema: 6845 $ref: "#/definitions/ErrorResponse" 6846 404: 6847 description: "No such container or path does not exist inside the container" 6848 schema: 6849 $ref: "#/definitions/ErrorResponse" 6850 examples: 6851 application/json: 6852 message: "No such container: c2ada9df5af8" 6853 500: 6854 description: "Server error" 6855 schema: 6856 $ref: "#/definitions/ErrorResponse" 6857 parameters: 6858 - name: "id" 6859 in: "path" 6860 required: true 6861 description: "ID or name of the container" 6862 type: "string" 6863 - name: "path" 6864 in: "query" 6865 required: true 6866 description: "Path to a directory in the container to extract the archive’s contents into. " 6867 type: "string" 6868 - name: "noOverwriteDirNonDir" 6869 in: "query" 6870 description: | 6871 If `1`, `true`, or `True` then it will be an error if unpacking the 6872 given content would cause an existing directory to be replaced with 6873 a non-directory and vice versa. 6874 type: "string" 6875 - name: "copyUIDGID" 6876 in: "query" 6877 description: | 6878 If `1`, `true`, then it will copy UID/GID maps to the dest file or 6879 dir 6880 type: "string" 6881 - name: "inputStream" 6882 in: "body" 6883 required: true 6884 description: | 6885 The input stream must be a tar archive compressed with one of the 6886 following algorithms: `identity` (no compression), `gzip`, `bzip2`, 6887 or `xz`. 6888 schema: 6889 type: "string" 6890 format: "binary" 6891 tags: ["Container"] 6892 /containers/prune: 6893 post: 6894 summary: "Delete stopped containers" 6895 produces: 6896 - "application/json" 6897 operationId: "ContainerPrune" 6898 parameters: 6899 - name: "filters" 6900 in: "query" 6901 description: | 6902 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 6903 6904 Available filters: 6905 - `until=<timestamp>` Prune containers created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. 6906 - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune containers with (or without, in case `label!=...` is used) the specified labels. 6907 type: "string" 6908 responses: 6909 200: 6910 description: "No error" 6911 schema: 6912 type: "object" 6913 title: "ContainerPruneResponse" 6914 properties: 6915 ContainersDeleted: 6916 description: "Container IDs that were deleted" 6917 type: "array" 6918 items: 6919 type: "string" 6920 SpaceReclaimed: 6921 description: "Disk space reclaimed in bytes" 6922 type: "integer" 6923 format: "int64" 6924 500: 6925 description: "Server error" 6926 schema: 6927 $ref: "#/definitions/ErrorResponse" 6928 tags: ["Container"] 6929 /images/json: 6930 get: 6931 summary: "List Images" 6932 description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image." 6933 operationId: "ImageList" 6934 produces: 6935 - "application/json" 6936 responses: 6937 200: 6938 description: "Summary image data for the images matching the query" 6939 schema: 6940 type: "array" 6941 items: 6942 $ref: "#/definitions/ImageSummary" 6943 examples: 6944 application/json: 6945 - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" 6946 ParentId: "" 6947 RepoTags: 6948 - "ubuntu:12.04" 6949 - "ubuntu:precise" 6950 RepoDigests: 6951 - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787" 6952 Created: 1474925151 6953 Size: 103579269 6954 VirtualSize: 103579269 6955 SharedSize: 0 6956 Labels: {} 6957 Containers: 2 6958 - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175" 6959 ParentId: "" 6960 RepoTags: 6961 - "ubuntu:12.10" 6962 - "ubuntu:quantal" 6963 RepoDigests: 6964 - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7" 6965 - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3" 6966 Created: 1403128455 6967 Size: 172064416 6968 VirtualSize: 172064416 6969 SharedSize: 0 6970 Labels: {} 6971 Containers: 5 6972 500: 6973 description: "server error" 6974 schema: 6975 $ref: "#/definitions/ErrorResponse" 6976 parameters: 6977 - name: "all" 6978 in: "query" 6979 description: "Show all images. Only images from a final layer (no children) are shown by default." 6980 type: "boolean" 6981 default: false 6982 - name: "filters" 6983 in: "query" 6984 description: | 6985 A JSON encoded value of the filters (a `map[string][]string`) to 6986 process on the images list. 6987 6988 Available filters: 6989 6990 - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 6991 - `dangling=true` 6992 - `label=key` or `label="key=value"` of an image label 6993 - `reference`=(`<image-name>[:<tag>]`) 6994 - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 6995 type: "string" 6996 - name: "digests" 6997 in: "query" 6998 description: "Show digest information as a `RepoDigests` field on each image." 6999 type: "boolean" 7000 default: false 7001 tags: ["Image"] 7002 /build: 7003 post: 7004 summary: "Build an image" 7005 description: | 7006 Build an image from a tar archive with a `Dockerfile` in it. 7007 7008 The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). 7009 7010 The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. 7011 7012 The build is canceled if the client drops the connection by quitting or being killed. 7013 operationId: "ImageBuild" 7014 consumes: 7015 - "application/octet-stream" 7016 produces: 7017 - "application/json" 7018 parameters: 7019 - name: "inputStream" 7020 in: "body" 7021 description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." 7022 schema: 7023 type: "string" 7024 format: "binary" 7025 - name: "dockerfile" 7026 in: "query" 7027 description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." 7028 type: "string" 7029 default: "Dockerfile" 7030 - name: "t" 7031 in: "query" 7032 description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters." 7033 type: "string" 7034 - name: "extrahosts" 7035 in: "query" 7036 description: "Extra hosts to add to /etc/hosts" 7037 type: "string" 7038 - name: "remote" 7039 in: "query" 7040 description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball." 7041 type: "string" 7042 - name: "q" 7043 in: "query" 7044 description: "Suppress verbose build output." 7045 type: "boolean" 7046 default: false 7047 - name: "nocache" 7048 in: "query" 7049 description: "Do not use the cache when building the image." 7050 type: "boolean" 7051 default: false 7052 - name: "cachefrom" 7053 in: "query" 7054 description: "JSON array of images used for build cache resolution." 7055 type: "string" 7056 - name: "pull" 7057 in: "query" 7058 description: "Attempt to pull the image even if an older image exists locally." 7059 type: "string" 7060 - name: "rm" 7061 in: "query" 7062 description: "Remove intermediate containers after a successful build." 7063 type: "boolean" 7064 default: true 7065 - name: "forcerm" 7066 in: "query" 7067 description: "Always remove intermediate containers, even upon failure." 7068 type: "boolean" 7069 default: false 7070 - name: "memory" 7071 in: "query" 7072 description: "Set memory limit for build." 7073 type: "integer" 7074 - name: "memswap" 7075 in: "query" 7076 description: "Total memory (memory + swap). Set as `-1` to disable swap." 7077 type: "integer" 7078 - name: "cpushares" 7079 in: "query" 7080 description: "CPU shares (relative weight)." 7081 type: "integer" 7082 - name: "cpusetcpus" 7083 in: "query" 7084 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." 7085 type: "string" 7086 - name: "cpuperiod" 7087 in: "query" 7088 description: "The length of a CPU period in microseconds." 7089 type: "integer" 7090 - name: "cpuquota" 7091 in: "query" 7092 description: "Microseconds of CPU time that the container can get in a CPU period." 7093 type: "integer" 7094 - name: "buildargs" 7095 in: "query" 7096 description: > 7097 JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker 7098 uses the buildargs as the environment context for commands run via the `Dockerfile` RUN 7099 instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for 7100 passing secret values. 7101 7102 7103 For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the 7104 the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. 7105 7106 7107 [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) 7108 type: "string" 7109 - name: "shmsize" 7110 in: "query" 7111 description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." 7112 type: "integer" 7113 - name: "squash" 7114 in: "query" 7115 description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" 7116 type: "boolean" 7117 - name: "labels" 7118 in: "query" 7119 description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." 7120 type: "string" 7121 - name: "networkmode" 7122 in: "query" 7123 description: | 7124 Sets the networking mode for the run commands during build. Supported 7125 standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. 7126 Any other value is taken as a custom network's name or ID to which this 7127 container should connect to. 7128 type: "string" 7129 - name: "Content-type" 7130 in: "header" 7131 type: "string" 7132 enum: 7133 - "application/x-tar" 7134 default: "application/x-tar" 7135 - name: "X-Registry-Config" 7136 in: "header" 7137 description: | 7138 This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. 7139 7140 The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: 7141 7142 ``` 7143 { 7144 "docker.example.com": { 7145 "username": "janedoe", 7146 "password": "hunter2" 7147 }, 7148 "https://index.docker.io/v1/": { 7149 "username": "mobydock", 7150 "password": "conta1n3rize14" 7151 } 7152 } 7153 ``` 7154 7155 Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. 7156 type: "string" 7157 - name: "platform" 7158 in: "query" 7159 description: "Platform in the format os[/arch[/variant]]" 7160 type: "string" 7161 default: "" 7162 - name: "target" 7163 in: "query" 7164 description: "Target build stage" 7165 type: "string" 7166 default: "" 7167 - name: "outputs" 7168 in: "query" 7169 description: "BuildKit output configuration" 7170 type: "string" 7171 default: "" 7172 responses: 7173 200: 7174 description: "no error" 7175 400: 7176 description: "Bad parameter" 7177 schema: 7178 $ref: "#/definitions/ErrorResponse" 7179 500: 7180 description: "server error" 7181 schema: 7182 $ref: "#/definitions/ErrorResponse" 7183 tags: ["Image"] 7184 /build/prune: 7185 post: 7186 summary: "Delete builder cache" 7187 produces: 7188 - "application/json" 7189 operationId: "BuildPrune" 7190 parameters: 7191 - name: "keep-storage" 7192 in: "query" 7193 description: "Amount of disk space in bytes to keep for cache" 7194 type: "integer" 7195 format: "int64" 7196 - name: "all" 7197 in: "query" 7198 type: "boolean" 7199 description: "Remove all types of build cache" 7200 - name: "filters" 7201 in: "query" 7202 type: "string" 7203 description: | 7204 A JSON encoded value of the filters (a `map[string][]string`) to 7205 process on the list of build cache objects. 7206 7207 Available filters: 7208 7209 - `until=<duration>`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h') 7210 - `id=<id>` 7211 - `parent=<id>` 7212 - `type=<string>` 7213 - `description=<string>` 7214 - `inuse` 7215 - `shared` 7216 - `private` 7217 responses: 7218 200: 7219 description: "No error" 7220 schema: 7221 type: "object" 7222 title: "BuildPruneResponse" 7223 properties: 7224 CachesDeleted: 7225 type: "array" 7226 items: 7227 description: "ID of build cache object" 7228 type: "string" 7229 SpaceReclaimed: 7230 description: "Disk space reclaimed in bytes" 7231 type: "integer" 7232 format: "int64" 7233 500: 7234 description: "Server error" 7235 schema: 7236 $ref: "#/definitions/ErrorResponse" 7237 tags: ["Image"] 7238 /images/create: 7239 post: 7240 summary: "Create an image" 7241 description: "Create an image by either pulling it from a registry or importing it." 7242 operationId: "ImageCreate" 7243 consumes: 7244 - "text/plain" 7245 - "application/octet-stream" 7246 produces: 7247 - "application/json" 7248 responses: 7249 200: 7250 description: "no error" 7251 404: 7252 description: "repository does not exist or no read access" 7253 schema: 7254 $ref: "#/definitions/ErrorResponse" 7255 500: 7256 description: "server error" 7257 schema: 7258 $ref: "#/definitions/ErrorResponse" 7259 parameters: 7260 - name: "fromImage" 7261 in: "query" 7262 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." 7263 type: "string" 7264 - name: "fromSrc" 7265 in: "query" 7266 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." 7267 type: "string" 7268 - name: "repo" 7269 in: "query" 7270 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." 7271 type: "string" 7272 - name: "tag" 7273 in: "query" 7274 description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." 7275 type: "string" 7276 - name: "message" 7277 in: "query" 7278 description: "Set commit message for imported image." 7279 type: "string" 7280 - name: "inputImage" 7281 in: "body" 7282 description: "Image content if the value `-` has been specified in fromSrc query parameter" 7283 schema: 7284 type: "string" 7285 required: false 7286 - name: "X-Registry-Auth" 7287 in: "header" 7288 description: | 7289 A base64url-encoded auth configuration. 7290 7291 Refer to the [authentication section](#section/Authentication) for 7292 details. 7293 type: "string" 7294 - name: "platform" 7295 in: "query" 7296 description: "Platform in the format os[/arch[/variant]]" 7297 type: "string" 7298 default: "" 7299 tags: ["Image"] 7300 /images/{name}/json: 7301 get: 7302 summary: "Inspect an image" 7303 description: "Return low-level information about an image." 7304 operationId: "ImageInspect" 7305 produces: 7306 - "application/json" 7307 responses: 7308 200: 7309 description: "No error" 7310 schema: 7311 $ref: "#/definitions/Image" 7312 examples: 7313 application/json: 7314 Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" 7315 Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a" 7316 Comment: "" 7317 Os: "linux" 7318 Architecture: "amd64" 7319 Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" 7320 ContainerConfig: 7321 Tty: false 7322 Hostname: "e611e15f9c9d" 7323 Domainname: "" 7324 AttachStdout: false 7325 PublishService: "" 7326 AttachStdin: false 7327 OpenStdin: false 7328 StdinOnce: false 7329 NetworkDisabled: false 7330 OnBuild: [] 7331 Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" 7332 User: "" 7333 WorkingDir: "" 7334 MacAddress: "" 7335 AttachStderr: false 7336 Labels: 7337 com.example.license: "GPL" 7338 com.example.version: "1.0" 7339 com.example.vendor: "Acme" 7340 Env: 7341 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 7342 Cmd: 7343 - "/bin/sh" 7344 - "-c" 7345 - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0" 7346 DockerVersion: "1.9.0-dev" 7347 VirtualSize: 188359297 7348 Size: 0 7349 Author: "" 7350 Created: "2015-09-10T08:30:53.26995814Z" 7351 GraphDriver: 7352 Name: "aufs" 7353 Data: {} 7354 RepoDigests: 7355 - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf" 7356 RepoTags: 7357 - "example:1.0" 7358 - "example:latest" 7359 - "example:stable" 7360 Config: 7361 Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" 7362 NetworkDisabled: false 7363 OnBuild: [] 7364 StdinOnce: false 7365 PublishService: "" 7366 AttachStdin: false 7367 OpenStdin: false 7368 Domainname: "" 7369 AttachStdout: false 7370 Tty: false 7371 Hostname: "e611e15f9c9d" 7372 Cmd: 7373 - "/bin/bash" 7374 Env: 7375 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 7376 Labels: 7377 com.example.vendor: "Acme" 7378 com.example.version: "1.0" 7379 com.example.license: "GPL" 7380 MacAddress: "" 7381 AttachStderr: false 7382 WorkingDir: "" 7383 User: "" 7384 RootFS: 7385 Type: "layers" 7386 Layers: 7387 - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" 7388 - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" 7389 404: 7390 description: "No such image" 7391 schema: 7392 $ref: "#/definitions/ErrorResponse" 7393 examples: 7394 application/json: 7395 message: "No such image: someimage (tag: latest)" 7396 500: 7397 description: "Server error" 7398 schema: 7399 $ref: "#/definitions/ErrorResponse" 7400 parameters: 7401 - name: "name" 7402 in: "path" 7403 description: "Image name or id" 7404 type: "string" 7405 required: true 7406 tags: ["Image"] 7407 /images/{name}/history: 7408 get: 7409 summary: "Get the history of an image" 7410 description: "Return parent layers of an image." 7411 operationId: "ImageHistory" 7412 produces: ["application/json"] 7413 responses: 7414 200: 7415 description: "List of image layers" 7416 schema: 7417 type: "array" 7418 items: 7419 type: "object" 7420 x-go-name: HistoryResponseItem 7421 title: "HistoryResponseItem" 7422 description: "individual image layer information in response to ImageHistory operation" 7423 required: [Id, Created, CreatedBy, Tags, Size, Comment] 7424 properties: 7425 Id: 7426 type: "string" 7427 x-nullable: false 7428 Created: 7429 type: "integer" 7430 format: "int64" 7431 x-nullable: false 7432 CreatedBy: 7433 type: "string" 7434 x-nullable: false 7435 Tags: 7436 type: "array" 7437 items: 7438 type: "string" 7439 Size: 7440 type: "integer" 7441 format: "int64" 7442 x-nullable: false 7443 Comment: 7444 type: "string" 7445 x-nullable: false 7446 examples: 7447 application/json: 7448 - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" 7449 Created: 1398108230 7450 CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" 7451 Tags: 7452 - "ubuntu:lucid" 7453 - "ubuntu:10.04" 7454 Size: 182964289 7455 Comment: "" 7456 - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" 7457 Created: 1398108222 7458 CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi <admwiggin@gmail.com> - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/" 7459 Tags: [] 7460 Size: 0 7461 Comment: "" 7462 - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" 7463 Created: 1371157430 7464 CreatedBy: "" 7465 Tags: 7466 - "scratch12:latest" 7467 - "scratch:latest" 7468 Size: 0 7469 Comment: "Imported from -" 7470 404: 7471 description: "No such image" 7472 schema: 7473 $ref: "#/definitions/ErrorResponse" 7474 500: 7475 description: "Server error" 7476 schema: 7477 $ref: "#/definitions/ErrorResponse" 7478 parameters: 7479 - name: "name" 7480 in: "path" 7481 description: "Image name or ID" 7482 type: "string" 7483 required: true 7484 tags: ["Image"] 7485 /images/{name}/push: 7486 post: 7487 summary: "Push an image" 7488 description: | 7489 Push an image to a registry. 7490 7491 If you wish to push an image on to a private registry, that image must 7492 already have a tag which references the registry. For example, 7493 `registry.example.com/myimage:latest`. 7494 7495 The push is cancelled if the HTTP connection is closed. 7496 operationId: "ImagePush" 7497 consumes: 7498 - "application/octet-stream" 7499 responses: 7500 200: 7501 description: "No error" 7502 404: 7503 description: "No such image" 7504 schema: 7505 $ref: "#/definitions/ErrorResponse" 7506 500: 7507 description: "Server error" 7508 schema: 7509 $ref: "#/definitions/ErrorResponse" 7510 parameters: 7511 - name: "name" 7512 in: "path" 7513 description: "Image name or ID." 7514 type: "string" 7515 required: true 7516 - name: "tag" 7517 in: "query" 7518 description: "The tag to associate with the image on the registry." 7519 type: "string" 7520 - name: "X-Registry-Auth" 7521 in: "header" 7522 description: | 7523 A base64url-encoded auth configuration. 7524 7525 Refer to the [authentication section](#section/Authentication) for 7526 details. 7527 type: "string" 7528 required: true 7529 tags: ["Image"] 7530 /images/{name}/tag: 7531 post: 7532 summary: "Tag an image" 7533 description: "Tag an image so that it becomes part of a repository." 7534 operationId: "ImageTag" 7535 responses: 7536 201: 7537 description: "No error" 7538 400: 7539 description: "Bad parameter" 7540 schema: 7541 $ref: "#/definitions/ErrorResponse" 7542 404: 7543 description: "No such image" 7544 schema: 7545 $ref: "#/definitions/ErrorResponse" 7546 409: 7547 description: "Conflict" 7548 schema: 7549 $ref: "#/definitions/ErrorResponse" 7550 500: 7551 description: "Server error" 7552 schema: 7553 $ref: "#/definitions/ErrorResponse" 7554 parameters: 7555 - name: "name" 7556 in: "path" 7557 description: "Image name or ID to tag." 7558 type: "string" 7559 required: true 7560 - name: "repo" 7561 in: "query" 7562 description: "The repository to tag in. For example, `someuser/someimage`." 7563 type: "string" 7564 - name: "tag" 7565 in: "query" 7566 description: "The name of the new tag." 7567 type: "string" 7568 tags: ["Image"] 7569 /images/{name}: 7570 delete: 7571 summary: "Remove an image" 7572 description: | 7573 Remove an image, along with any untagged parent images that were 7574 referenced by that image. 7575 7576 Images can't be removed if they have descendant images, are being 7577 used by a running container or are being used by a build. 7578 operationId: "ImageDelete" 7579 produces: ["application/json"] 7580 responses: 7581 200: 7582 description: "The image was deleted successfully" 7583 schema: 7584 type: "array" 7585 items: 7586 $ref: "#/definitions/ImageDeleteResponseItem" 7587 examples: 7588 application/json: 7589 - Untagged: "3e2f21a89f" 7590 - Deleted: "3e2f21a89f" 7591 - Deleted: "53b4f83ac9" 7592 404: 7593 description: "No such image" 7594 schema: 7595 $ref: "#/definitions/ErrorResponse" 7596 409: 7597 description: "Conflict" 7598 schema: 7599 $ref: "#/definitions/ErrorResponse" 7600 500: 7601 description: "Server error" 7602 schema: 7603 $ref: "#/definitions/ErrorResponse" 7604 parameters: 7605 - name: "name" 7606 in: "path" 7607 description: "Image name or ID" 7608 type: "string" 7609 required: true 7610 - name: "force" 7611 in: "query" 7612 description: "Remove the image even if it is being used by stopped containers or has other tags" 7613 type: "boolean" 7614 default: false 7615 - name: "noprune" 7616 in: "query" 7617 description: "Do not delete untagged parent images" 7618 type: "boolean" 7619 default: false 7620 tags: ["Image"] 7621 /images/search: 7622 get: 7623 summary: "Search images" 7624 description: "Search for an image on Docker Hub." 7625 operationId: "ImageSearch" 7626 produces: 7627 - "application/json" 7628 responses: 7629 200: 7630 description: "No error" 7631 schema: 7632 type: "array" 7633 items: 7634 type: "object" 7635 title: "ImageSearchResponseItem" 7636 properties: 7637 description: 7638 type: "string" 7639 is_official: 7640 type: "boolean" 7641 is_automated: 7642 type: "boolean" 7643 name: 7644 type: "string" 7645 star_count: 7646 type: "integer" 7647 examples: 7648 application/json: 7649 - description: "" 7650 is_official: false 7651 is_automated: false 7652 name: "wma55/u1210sshd" 7653 star_count: 0 7654 - description: "" 7655 is_official: false 7656 is_automated: false 7657 name: "jdswinbank/sshd" 7658 star_count: 0 7659 - description: "" 7660 is_official: false 7661 is_automated: false 7662 name: "vgauthier/sshd" 7663 star_count: 0 7664 500: 7665 description: "Server error" 7666 schema: 7667 $ref: "#/definitions/ErrorResponse" 7668 parameters: 7669 - name: "term" 7670 in: "query" 7671 description: "Term to search" 7672 type: "string" 7673 required: true 7674 - name: "limit" 7675 in: "query" 7676 description: "Maximum number of results to return" 7677 type: "integer" 7678 - name: "filters" 7679 in: "query" 7680 description: | 7681 A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: 7682 7683 - `is-automated=(true|false)` 7684 - `is-official=(true|false)` 7685 - `stars=<number>` Matches images that has at least 'number' stars. 7686 type: "string" 7687 tags: ["Image"] 7688 /images/prune: 7689 post: 7690 summary: "Delete unused images" 7691 produces: 7692 - "application/json" 7693 operationId: "ImagePrune" 7694 parameters: 7695 - name: "filters" 7696 in: "query" 7697 description: | 7698 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: 7699 7700 - `dangling=<boolean>` When set to `true` (or `1`), prune only 7701 unused *and* untagged images. When set to `false` 7702 (or `0`), all unused images are pruned. 7703 - `until=<string>` Prune images created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. 7704 - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune images with (or without, in case `label!=...` is used) the specified labels. 7705 type: "string" 7706 responses: 7707 200: 7708 description: "No error" 7709 schema: 7710 type: "object" 7711 title: "ImagePruneResponse" 7712 properties: 7713 ImagesDeleted: 7714 description: "Images that were deleted" 7715 type: "array" 7716 items: 7717 $ref: "#/definitions/ImageDeleteResponseItem" 7718 SpaceReclaimed: 7719 description: "Disk space reclaimed in bytes" 7720 type: "integer" 7721 format: "int64" 7722 500: 7723 description: "Server error" 7724 schema: 7725 $ref: "#/definitions/ErrorResponse" 7726 tags: ["Image"] 7727 /auth: 7728 post: 7729 summary: "Check auth configuration" 7730 description: | 7731 Validate credentials for a registry and, if available, get an identity 7732 token for accessing the registry without password. 7733 operationId: "SystemAuth" 7734 consumes: ["application/json"] 7735 produces: ["application/json"] 7736 responses: 7737 200: 7738 description: "An identity token was generated successfully." 7739 schema: 7740 type: "object" 7741 title: "SystemAuthResponse" 7742 required: [Status] 7743 properties: 7744 Status: 7745 description: "The status of the authentication" 7746 type: "string" 7747 x-nullable: false 7748 IdentityToken: 7749 description: "An opaque token used to authenticate a user after a successful login" 7750 type: "string" 7751 x-nullable: false 7752 examples: 7753 application/json: 7754 Status: "Login Succeeded" 7755 IdentityToken: "9cbaf023786cd7..." 7756 204: 7757 description: "No error" 7758 500: 7759 description: "Server error" 7760 schema: 7761 $ref: "#/definitions/ErrorResponse" 7762 parameters: 7763 - name: "authConfig" 7764 in: "body" 7765 description: "Authentication to check" 7766 schema: 7767 $ref: "#/definitions/AuthConfig" 7768 tags: ["System"] 7769 /info: 7770 get: 7771 summary: "Get system information" 7772 operationId: "SystemInfo" 7773 produces: 7774 - "application/json" 7775 responses: 7776 200: 7777 description: "No error" 7778 schema: 7779 $ref: "#/definitions/SystemInfo" 7780 500: 7781 description: "Server error" 7782 schema: 7783 $ref: "#/definitions/ErrorResponse" 7784 tags: ["System"] 7785 /version: 7786 get: 7787 summary: "Get version" 7788 description: "Returns the version of Docker that is running and various information about the system that Docker is running on." 7789 operationId: "SystemVersion" 7790 produces: ["application/json"] 7791 responses: 7792 200: 7793 description: "no error" 7794 schema: 7795 type: "object" 7796 title: "SystemVersionResponse" 7797 properties: 7798 Platform: 7799 type: "object" 7800 required: [Name] 7801 properties: 7802 Name: 7803 type: "string" 7804 Components: 7805 type: "array" 7806 items: 7807 type: "object" 7808 x-go-name: ComponentVersion 7809 required: [Name, Version] 7810 properties: 7811 Name: 7812 type: "string" 7813 Version: 7814 type: "string" 7815 x-nullable: false 7816 Details: 7817 type: "object" 7818 x-nullable: true 7819 7820 Version: 7821 type: "string" 7822 ApiVersion: 7823 type: "string" 7824 MinAPIVersion: 7825 type: "string" 7826 GitCommit: 7827 type: "string" 7828 GoVersion: 7829 type: "string" 7830 Os: 7831 type: "string" 7832 Arch: 7833 type: "string" 7834 KernelVersion: 7835 type: "string" 7836 Experimental: 7837 type: "boolean" 7838 BuildTime: 7839 type: "string" 7840 examples: 7841 application/json: 7842 Version: "17.04.0" 7843 Os: "linux" 7844 KernelVersion: "3.19.0-23-generic" 7845 GoVersion: "go1.7.5" 7846 GitCommit: "deadbee" 7847 Arch: "amd64" 7848 ApiVersion: "1.27" 7849 MinAPIVersion: "1.12" 7850 BuildTime: "2016-06-14T07:09:13.444803460+00:00" 7851 Experimental: true 7852 500: 7853 description: "server error" 7854 schema: 7855 $ref: "#/definitions/ErrorResponse" 7856 tags: ["System"] 7857 /_ping: 7858 get: 7859 summary: "Ping" 7860 description: "This is a dummy endpoint you can use to test if the server is accessible." 7861 operationId: "SystemPing" 7862 produces: ["text/plain"] 7863 responses: 7864 200: 7865 description: "no error" 7866 schema: 7867 type: "string" 7868 example: "OK" 7869 headers: 7870 API-Version: 7871 type: "string" 7872 description: "Max API Version the server supports" 7873 BuildKit-Version: 7874 type: "string" 7875 description: "Default version of docker image builder" 7876 Docker-Experimental: 7877 type: "boolean" 7878 description: "If the server is running with experimental mode enabled" 7879 Cache-Control: 7880 type: "string" 7881 default: "no-cache, no-store, must-revalidate" 7882 Pragma: 7883 type: "string" 7884 default: "no-cache" 7885 500: 7886 description: "server error" 7887 schema: 7888 $ref: "#/definitions/ErrorResponse" 7889 headers: 7890 Cache-Control: 7891 type: "string" 7892 default: "no-cache, no-store, must-revalidate" 7893 Pragma: 7894 type: "string" 7895 default: "no-cache" 7896 tags: ["System"] 7897 head: 7898 summary: "Ping" 7899 description: "This is a dummy endpoint you can use to test if the server is accessible." 7900 operationId: "SystemPingHead" 7901 produces: ["text/plain"] 7902 responses: 7903 200: 7904 description: "no error" 7905 schema: 7906 type: "string" 7907 example: "(empty)" 7908 headers: 7909 API-Version: 7910 type: "string" 7911 description: "Max API Version the server supports" 7912 BuildKit-Version: 7913 type: "string" 7914 description: "Default version of docker image builder" 7915 Docker-Experimental: 7916 type: "boolean" 7917 description: "If the server is running with experimental mode enabled" 7918 Cache-Control: 7919 type: "string" 7920 default: "no-cache, no-store, must-revalidate" 7921 Pragma: 7922 type: "string" 7923 default: "no-cache" 7924 500: 7925 description: "server error" 7926 schema: 7927 $ref: "#/definitions/ErrorResponse" 7928 tags: ["System"] 7929 /commit: 7930 post: 7931 summary: "Create a new image from a container" 7932 operationId: "ImageCommit" 7933 consumes: 7934 - "application/json" 7935 produces: 7936 - "application/json" 7937 responses: 7938 201: 7939 description: "no error" 7940 schema: 7941 $ref: "#/definitions/IdResponse" 7942 404: 7943 description: "no such container" 7944 schema: 7945 $ref: "#/definitions/ErrorResponse" 7946 examples: 7947 application/json: 7948 message: "No such container: c2ada9df5af8" 7949 500: 7950 description: "server error" 7951 schema: 7952 $ref: "#/definitions/ErrorResponse" 7953 parameters: 7954 - name: "containerConfig" 7955 in: "body" 7956 description: "The container configuration" 7957 schema: 7958 $ref: "#/definitions/ContainerConfig" 7959 - name: "container" 7960 in: "query" 7961 description: "The ID or name of the container to commit" 7962 type: "string" 7963 - name: "repo" 7964 in: "query" 7965 description: "Repository name for the created image" 7966 type: "string" 7967 - name: "tag" 7968 in: "query" 7969 description: "Tag name for the create image" 7970 type: "string" 7971 - name: "comment" 7972 in: "query" 7973 description: "Commit message" 7974 type: "string" 7975 - name: "author" 7976 in: "query" 7977 description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)" 7978 type: "string" 7979 - name: "pause" 7980 in: "query" 7981 description: "Whether to pause the container before committing" 7982 type: "boolean" 7983 default: true 7984 - name: "changes" 7985 in: "query" 7986 description: "`Dockerfile` instructions to apply while committing" 7987 type: "string" 7988 tags: ["Image"] 7989 /events: 7990 get: 7991 summary: "Monitor events" 7992 description: | 7993 Stream real-time events from the server. 7994 7995 Various objects within Docker report events when something happens to them. 7996 7997 Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, and `update` 7998 7999 Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, and `untag` 8000 8001 Volumes report these events: `create`, `mount`, `unmount`, and `destroy` 8002 8003 Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, and `remove` 8004 8005 The Docker daemon reports these events: `reload` 8006 8007 Services report these events: `create`, `update`, and `remove` 8008 8009 Nodes report these events: `create`, `update`, and `remove` 8010 8011 Secrets report these events: `create`, `update`, and `remove` 8012 8013 Configs report these events: `create`, `update`, and `remove` 8014 8015 operationId: "SystemEvents" 8016 produces: 8017 - "application/json" 8018 responses: 8019 200: 8020 description: "no error" 8021 schema: 8022 type: "object" 8023 title: "SystemEventsResponse" 8024 properties: 8025 Type: 8026 description: "The type of object emitting the event" 8027 type: "string" 8028 Action: 8029 description: "The type of event" 8030 type: "string" 8031 Actor: 8032 type: "object" 8033 properties: 8034 ID: 8035 description: "The ID of the object emitting the event" 8036 type: "string" 8037 Attributes: 8038 description: "Various key/value attributes of the object, depending on its type" 8039 type: "object" 8040 additionalProperties: 8041 type: "string" 8042 time: 8043 description: "Timestamp of event" 8044 type: "integer" 8045 timeNano: 8046 description: "Timestamp of event, with nanosecond accuracy" 8047 type: "integer" 8048 format: "int64" 8049 examples: 8050 application/json: 8051 Type: "container" 8052 Action: "create" 8053 Actor: 8054 ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" 8055 Attributes: 8056 com.example.some-label: "some-label-value" 8057 image: "alpine" 8058 name: "my-container" 8059 time: 1461943101 8060 400: 8061 description: "bad parameter" 8062 schema: 8063 $ref: "#/definitions/ErrorResponse" 8064 500: 8065 description: "server error" 8066 schema: 8067 $ref: "#/definitions/ErrorResponse" 8068 parameters: 8069 - name: "since" 8070 in: "query" 8071 description: "Show events created since this timestamp then stream new events." 8072 type: "string" 8073 - name: "until" 8074 in: "query" 8075 description: "Show events created until this timestamp then stop streaming." 8076 type: "string" 8077 - name: "filters" 8078 in: "query" 8079 description: | 8080 A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: 8081 8082 - `config=<string>` config name or ID 8083 - `container=<string>` container name or ID 8084 - `daemon=<string>` daemon name or ID 8085 - `event=<string>` event type 8086 - `image=<string>` image name or ID 8087 - `label=<string>` image or container label 8088 - `network=<string>` network name or ID 8089 - `node=<string>` node ID 8090 - `plugin`=<string> plugin name or ID 8091 - `scope`=<string> local or swarm 8092 - `secret=<string>` secret name or ID 8093 - `service=<string>` service name or ID 8094 - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` 8095 - `volume=<string>` volume name 8096 type: "string" 8097 tags: ["System"] 8098 /system/df: 8099 get: 8100 summary: "Get data usage information" 8101 operationId: "SystemDataUsage" 8102 responses: 8103 200: 8104 description: "no error" 8105 schema: 8106 type: "object" 8107 title: "SystemDataUsageResponse" 8108 properties: 8109 LayersSize: 8110 type: "integer" 8111 format: "int64" 8112 Images: 8113 type: "array" 8114 items: 8115 $ref: "#/definitions/ImageSummary" 8116 Containers: 8117 type: "array" 8118 items: 8119 $ref: "#/definitions/ContainerSummary" 8120 Volumes: 8121 type: "array" 8122 items: 8123 $ref: "#/definitions/Volume" 8124 BuildCache: 8125 type: "array" 8126 items: 8127 $ref: "#/definitions/BuildCache" 8128 example: 8129 LayersSize: 1092588 8130 Images: 8131 - 8132 Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 8133 ParentId: "" 8134 RepoTags: 8135 - "busybox:latest" 8136 RepoDigests: 8137 - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" 8138 Created: 1466724217 8139 Size: 1092588 8140 SharedSize: 0 8141 VirtualSize: 1092588 8142 Labels: {} 8143 Containers: 1 8144 Containers: 8145 - 8146 Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" 8147 Names: 8148 - "/top" 8149 Image: "busybox" 8150 ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 8151 Command: "top" 8152 Created: 1472592424 8153 Ports: [] 8154 SizeRootFs: 1092588 8155 Labels: {} 8156 State: "exited" 8157 Status: "Exited (0) 56 minutes ago" 8158 HostConfig: 8159 NetworkMode: "default" 8160 NetworkSettings: 8161 Networks: 8162 bridge: 8163 IPAMConfig: null 8164 Links: null 8165 Aliases: null 8166 NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" 8167 EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" 8168 Gateway: "172.18.0.1" 8169 IPAddress: "172.18.0.2" 8170 IPPrefixLen: 16 8171 IPv6Gateway: "" 8172 GlobalIPv6Address: "" 8173 GlobalIPv6PrefixLen: 0 8174 MacAddress: "02:42:ac:12:00:02" 8175 Mounts: [] 8176 Volumes: 8177 - 8178 Name: "my-volume" 8179 Driver: "local" 8180 Mountpoint: "/var/lib/docker/volumes/my-volume/_data" 8181 Labels: null 8182 Scope: "local" 8183 Options: null 8184 UsageData: 8185 Size: 10920104 8186 RefCount: 2 8187 500: 8188 description: "server error" 8189 schema: 8190 $ref: "#/definitions/ErrorResponse" 8191 tags: ["System"] 8192 /images/{name}/get: 8193 get: 8194 summary: "Export an image" 8195 description: | 8196 Get a tarball containing all images and metadata for a repository. 8197 8198 If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. 8199 8200 ### Image tarball format 8201 8202 An image tarball contains one directory per image layer (named using its long ID), each containing these files: 8203 8204 - `VERSION`: currently `1.0` - the file format version 8205 - `json`: detailed layer information, similar to `docker inspect layer_id` 8206 - `layer.tar`: A tarfile containing the filesystem changes in this layer 8207 8208 The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. 8209 8210 If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. 8211 8212 ```json 8213 { 8214 "hello-world": { 8215 "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" 8216 } 8217 } 8218 ``` 8219 operationId: "ImageGet" 8220 produces: 8221 - "application/x-tar" 8222 responses: 8223 200: 8224 description: "no error" 8225 schema: 8226 type: "string" 8227 format: "binary" 8228 500: 8229 description: "server error" 8230 schema: 8231 $ref: "#/definitions/ErrorResponse" 8232 parameters: 8233 - name: "name" 8234 in: "path" 8235 description: "Image name or ID" 8236 type: "string" 8237 required: true 8238 tags: ["Image"] 8239 /images/get: 8240 get: 8241 summary: "Export several images" 8242 description: | 8243 Get a tarball containing all images and metadata for several image 8244 repositories. 8245 8246 For each value of the `names` parameter: if it is a specific name and 8247 tag (e.g. `ubuntu:latest`), then only that image (and its parents) are 8248 returned; if it is an image ID, similarly only that image (and its parents) 8249 are returned and there would be no names referenced in the 'repositories' 8250 file for this image ID. 8251 8252 For details on the format, see the [export image endpoint](#operation/ImageGet). 8253 operationId: "ImageGetAll" 8254 produces: 8255 - "application/x-tar" 8256 responses: 8257 200: 8258 description: "no error" 8259 schema: 8260 type: "string" 8261 format: "binary" 8262 500: 8263 description: "server error" 8264 schema: 8265 $ref: "#/definitions/ErrorResponse" 8266 parameters: 8267 - name: "names" 8268 in: "query" 8269 description: "Image names to filter by" 8270 type: "array" 8271 items: 8272 type: "string" 8273 tags: ["Image"] 8274 /images/load: 8275 post: 8276 summary: "Import images" 8277 description: | 8278 Load a set of images and tags into a repository. 8279 8280 For details on the format, see the [export image endpoint](#operation/ImageGet). 8281 operationId: "ImageLoad" 8282 consumes: 8283 - "application/x-tar" 8284 produces: 8285 - "application/json" 8286 responses: 8287 200: 8288 description: "no error" 8289 500: 8290 description: "server error" 8291 schema: 8292 $ref: "#/definitions/ErrorResponse" 8293 parameters: 8294 - name: "imagesTarball" 8295 in: "body" 8296 description: "Tar archive containing images" 8297 schema: 8298 type: "string" 8299 format: "binary" 8300 - name: "quiet" 8301 in: "query" 8302 description: "Suppress progress details during load." 8303 type: "boolean" 8304 default: false 8305 tags: ["Image"] 8306 /containers/{id}/exec: 8307 post: 8308 summary: "Create an exec instance" 8309 description: "Run a command inside a running container." 8310 operationId: "ContainerExec" 8311 consumes: 8312 - "application/json" 8313 produces: 8314 - "application/json" 8315 responses: 8316 201: 8317 description: "no error" 8318 schema: 8319 $ref: "#/definitions/IdResponse" 8320 404: 8321 description: "no such container" 8322 schema: 8323 $ref: "#/definitions/ErrorResponse" 8324 examples: 8325 application/json: 8326 message: "No such container: c2ada9df5af8" 8327 409: 8328 description: "container is paused" 8329 schema: 8330 $ref: "#/definitions/ErrorResponse" 8331 500: 8332 description: "Server error" 8333 schema: 8334 $ref: "#/definitions/ErrorResponse" 8335 parameters: 8336 - name: "execConfig" 8337 in: "body" 8338 description: "Exec configuration" 8339 schema: 8340 type: "object" 8341 properties: 8342 AttachStdin: 8343 type: "boolean" 8344 description: "Attach to `stdin` of the exec command." 8345 AttachStdout: 8346 type: "boolean" 8347 description: "Attach to `stdout` of the exec command." 8348 AttachStderr: 8349 type: "boolean" 8350 description: "Attach to `stderr` of the exec command." 8351 DetachKeys: 8352 type: "string" 8353 description: | 8354 Override the key sequence for detaching a container. Format is 8355 a single character `[a-Z]` or `ctrl-<value>` where `<value>` 8356 is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. 8357 Tty: 8358 type: "boolean" 8359 description: "Allocate a pseudo-TTY." 8360 Env: 8361 description: | 8362 A list of environment variables in the form `["VAR=value", ...]`. 8363 type: "array" 8364 items: 8365 type: "string" 8366 Cmd: 8367 type: "array" 8368 description: "Command to run, as a string or array of strings." 8369 items: 8370 type: "string" 8371 Privileged: 8372 type: "boolean" 8373 description: "Runs the exec process with extended privileges." 8374 default: false 8375 User: 8376 type: "string" 8377 description: | 8378 The user, and optionally, group to run the exec process inside 8379 the container. Format is one of: `user`, `user:group`, `uid`, 8380 or `uid:gid`. 8381 WorkingDir: 8382 type: "string" 8383 description: | 8384 The working directory for the exec process inside the container. 8385 example: 8386 AttachStdin: false 8387 AttachStdout: true 8388 AttachStderr: true 8389 DetachKeys: "ctrl-p,ctrl-q" 8390 Tty: false 8391 Cmd: 8392 - "date" 8393 Env: 8394 - "FOO=bar" 8395 - "BAZ=quux" 8396 required: true 8397 - name: "id" 8398 in: "path" 8399 description: "ID or name of container" 8400 type: "string" 8401 required: true 8402 tags: ["Exec"] 8403 /exec/{id}/start: 8404 post: 8405 summary: "Start an exec instance" 8406 description: | 8407 Starts a previously set up exec instance. If detach is true, this endpoint 8408 returns immediately after starting the command. Otherwise, it sets up an 8409 interactive session with the command. 8410 operationId: "ExecStart" 8411 consumes: 8412 - "application/json" 8413 produces: 8414 - "application/vnd.docker.raw-stream" 8415 responses: 8416 200: 8417 description: "No error" 8418 404: 8419 description: "No such exec instance" 8420 schema: 8421 $ref: "#/definitions/ErrorResponse" 8422 409: 8423 description: "Container is stopped or paused" 8424 schema: 8425 $ref: "#/definitions/ErrorResponse" 8426 parameters: 8427 - name: "execStartConfig" 8428 in: "body" 8429 schema: 8430 type: "object" 8431 properties: 8432 Detach: 8433 type: "boolean" 8434 description: "Detach from the command." 8435 Tty: 8436 type: "boolean" 8437 description: "Allocate a pseudo-TTY." 8438 example: 8439 Detach: false 8440 Tty: false 8441 - name: "id" 8442 in: "path" 8443 description: "Exec instance ID" 8444 required: true 8445 type: "string" 8446 tags: ["Exec"] 8447 /exec/{id}/resize: 8448 post: 8449 summary: "Resize an exec instance" 8450 description: | 8451 Resize the TTY session used by an exec instance. This endpoint only works 8452 if `tty` was specified as part of creating and starting the exec instance. 8453 operationId: "ExecResize" 8454 responses: 8455 201: 8456 description: "No error" 8457 404: 8458 description: "No such exec instance" 8459 schema: 8460 $ref: "#/definitions/ErrorResponse" 8461 parameters: 8462 - name: "id" 8463 in: "path" 8464 description: "Exec instance ID" 8465 required: true 8466 type: "string" 8467 - name: "h" 8468 in: "query" 8469 description: "Height of the TTY session in characters" 8470 type: "integer" 8471 - name: "w" 8472 in: "query" 8473 description: "Width of the TTY session in characters" 8474 type: "integer" 8475 tags: ["Exec"] 8476 /exec/{id}/json: 8477 get: 8478 summary: "Inspect an exec instance" 8479 description: "Return low-level information about an exec instance." 8480 operationId: "ExecInspect" 8481 produces: 8482 - "application/json" 8483 responses: 8484 200: 8485 description: "No error" 8486 schema: 8487 type: "object" 8488 title: "ExecInspectResponse" 8489 properties: 8490 CanRemove: 8491 type: "boolean" 8492 DetachKeys: 8493 type: "string" 8494 ID: 8495 type: "string" 8496 Running: 8497 type: "boolean" 8498 ExitCode: 8499 type: "integer" 8500 ProcessConfig: 8501 $ref: "#/definitions/ProcessConfig" 8502 OpenStdin: 8503 type: "boolean" 8504 OpenStderr: 8505 type: "boolean" 8506 OpenStdout: 8507 type: "boolean" 8508 ContainerID: 8509 type: "string" 8510 Pid: 8511 type: "integer" 8512 description: "The system process ID for the exec process." 8513 examples: 8514 application/json: 8515 CanRemove: false 8516 ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" 8517 DetachKeys: "" 8518 ExitCode: 2 8519 ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" 8520 OpenStderr: true 8521 OpenStdin: true 8522 OpenStdout: true 8523 ProcessConfig: 8524 arguments: 8525 - "-c" 8526 - "exit 2" 8527 entrypoint: "sh" 8528 privileged: false 8529 tty: true 8530 user: "1000" 8531 Running: false 8532 Pid: 42000 8533 404: 8534 description: "No such exec instance" 8535 schema: 8536 $ref: "#/definitions/ErrorResponse" 8537 500: 8538 description: "Server error" 8539 schema: 8540 $ref: "#/definitions/ErrorResponse" 8541 parameters: 8542 - name: "id" 8543 in: "path" 8544 description: "Exec instance ID" 8545 required: true 8546 type: "string" 8547 tags: ["Exec"] 8548 8549 /volumes: 8550 get: 8551 summary: "List volumes" 8552 operationId: "VolumeList" 8553 produces: ["application/json"] 8554 responses: 8555 200: 8556 description: "Summary volume data that matches the query" 8557 schema: 8558 type: "object" 8559 title: "VolumeListResponse" 8560 description: "Volume list response" 8561 required: [Volumes, Warnings] 8562 properties: 8563 Volumes: 8564 type: "array" 8565 x-nullable: false 8566 description: "List of volumes" 8567 items: 8568 $ref: "#/definitions/Volume" 8569 Warnings: 8570 type: "array" 8571 x-nullable: false 8572 description: | 8573 Warnings that occurred when fetching the list of volumes. 8574 items: 8575 type: "string" 8576 8577 examples: 8578 application/json: 8579 Volumes: 8580 - CreatedAt: "2017-07-19T12:00:26Z" 8581 Name: "tardis" 8582 Driver: "local" 8583 Mountpoint: "/var/lib/docker/volumes/tardis" 8584 Labels: 8585 com.example.some-label: "some-value" 8586 com.example.some-other-label: "some-other-value" 8587 Scope: "local" 8588 Options: 8589 device: "tmpfs" 8590 o: "size=100m,uid=1000" 8591 type: "tmpfs" 8592 Warnings: [] 8593 500: 8594 description: "Server error" 8595 schema: 8596 $ref: "#/definitions/ErrorResponse" 8597 parameters: 8598 - name: "filters" 8599 in: "query" 8600 description: | 8601 JSON encoded value of the filters (a `map[string][]string`) to 8602 process on the volumes list. Available filters: 8603 8604 - `dangling=<boolean>` When set to `true` (or `1`), returns all 8605 volumes that are not in use by a container. When set to `false` 8606 (or `0`), only volumes that are in use by one or more 8607 containers are returned. 8608 - `driver=<volume-driver-name>` Matches volumes based on their driver. 8609 - `label=<key>` or `label=<key>:<value>` Matches volumes based on 8610 the presence of a `label` alone or a `label` and a value. 8611 - `name=<volume-name>` Matches all or part of a volume name. 8612 type: "string" 8613 format: "json" 8614 tags: ["Volume"] 8615 8616 /volumes/create: 8617 post: 8618 summary: "Create a volume" 8619 operationId: "VolumeCreate" 8620 consumes: ["application/json"] 8621 produces: ["application/json"] 8622 responses: 8623 201: 8624 description: "The volume was created successfully" 8625 schema: 8626 $ref: "#/definitions/Volume" 8627 500: 8628 description: "Server error" 8629 schema: 8630 $ref: "#/definitions/ErrorResponse" 8631 parameters: 8632 - name: "volumeConfig" 8633 in: "body" 8634 required: true 8635 description: "Volume configuration" 8636 schema: 8637 type: "object" 8638 description: "Volume configuration" 8639 title: "VolumeConfig" 8640 properties: 8641 Name: 8642 description: | 8643 The new volume's name. If not specified, Docker generates a name. 8644 type: "string" 8645 x-nullable: false 8646 Driver: 8647 description: "Name of the volume driver to use." 8648 type: "string" 8649 default: "local" 8650 x-nullable: false 8651 DriverOpts: 8652 description: | 8653 A mapping of driver options and values. These options are 8654 passed directly to the driver and are driver specific. 8655 type: "object" 8656 additionalProperties: 8657 type: "string" 8658 Labels: 8659 description: "User-defined key/value metadata." 8660 type: "object" 8661 additionalProperties: 8662 type: "string" 8663 example: 8664 Name: "tardis" 8665 Labels: 8666 com.example.some-label: "some-value" 8667 com.example.some-other-label: "some-other-value" 8668 Driver: "custom" 8669 tags: ["Volume"] 8670 8671 /volumes/{name}: 8672 get: 8673 summary: "Inspect a volume" 8674 operationId: "VolumeInspect" 8675 produces: ["application/json"] 8676 responses: 8677 200: 8678 description: "No error" 8679 schema: 8680 $ref: "#/definitions/Volume" 8681 404: 8682 description: "No such volume" 8683 schema: 8684 $ref: "#/definitions/ErrorResponse" 8685 500: 8686 description: "Server error" 8687 schema: 8688 $ref: "#/definitions/ErrorResponse" 8689 parameters: 8690 - name: "name" 8691 in: "path" 8692 required: true 8693 description: "Volume name or ID" 8694 type: "string" 8695 tags: ["Volume"] 8696 8697 delete: 8698 summary: "Remove a volume" 8699 description: "Instruct the driver to remove the volume." 8700 operationId: "VolumeDelete" 8701 responses: 8702 204: 8703 description: "The volume was removed" 8704 404: 8705 description: "No such volume or volume driver" 8706 schema: 8707 $ref: "#/definitions/ErrorResponse" 8708 409: 8709 description: "Volume is in use and cannot be removed" 8710 schema: 8711 $ref: "#/definitions/ErrorResponse" 8712 500: 8713 description: "Server error" 8714 schema: 8715 $ref: "#/definitions/ErrorResponse" 8716 parameters: 8717 - name: "name" 8718 in: "path" 8719 required: true 8720 description: "Volume name or ID" 8721 type: "string" 8722 - name: "force" 8723 in: "query" 8724 description: "Force the removal of the volume" 8725 type: "boolean" 8726 default: false 8727 tags: ["Volume"] 8728 /volumes/prune: 8729 post: 8730 summary: "Delete unused volumes" 8731 produces: 8732 - "application/json" 8733 operationId: "VolumePrune" 8734 parameters: 8735 - name: "filters" 8736 in: "query" 8737 description: | 8738 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 8739 8740 Available filters: 8741 - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. 8742 type: "string" 8743 responses: 8744 200: 8745 description: "No error" 8746 schema: 8747 type: "object" 8748 title: "VolumePruneResponse" 8749 properties: 8750 VolumesDeleted: 8751 description: "Volumes that were deleted" 8752 type: "array" 8753 items: 8754 type: "string" 8755 SpaceReclaimed: 8756 description: "Disk space reclaimed in bytes" 8757 type: "integer" 8758 format: "int64" 8759 500: 8760 description: "Server error" 8761 schema: 8762 $ref: "#/definitions/ErrorResponse" 8763 tags: ["Volume"] 8764 /networks: 8765 get: 8766 summary: "List networks" 8767 description: | 8768 Returns a list of networks. For details on the format, see the 8769 [network inspect endpoint](#operation/NetworkInspect). 8770 8771 Note that it uses a different, smaller representation of a network than 8772 inspecting a single network. For example, the list of containers attached 8773 to the network is not propagated in API versions 1.28 and up. 8774 operationId: "NetworkList" 8775 produces: 8776 - "application/json" 8777 responses: 8778 200: 8779 description: "No error" 8780 schema: 8781 type: "array" 8782 items: 8783 $ref: "#/definitions/Network" 8784 examples: 8785 application/json: 8786 - Name: "bridge" 8787 Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" 8788 Created: "2016-10-19T06:21:00.416543526Z" 8789 Scope: "local" 8790 Driver: "bridge" 8791 EnableIPv6: false 8792 Internal: false 8793 Attachable: false 8794 Ingress: false 8795 IPAM: 8796 Driver: "default" 8797 Config: 8798 - 8799 Subnet: "172.17.0.0/16" 8800 Options: 8801 com.docker.network.bridge.default_bridge: "true" 8802 com.docker.network.bridge.enable_icc: "true" 8803 com.docker.network.bridge.enable_ip_masquerade: "true" 8804 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 8805 com.docker.network.bridge.name: "docker0" 8806 com.docker.network.driver.mtu: "1500" 8807 - Name: "none" 8808 Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" 8809 Created: "0001-01-01T00:00:00Z" 8810 Scope: "local" 8811 Driver: "null" 8812 EnableIPv6: false 8813 Internal: false 8814 Attachable: false 8815 Ingress: false 8816 IPAM: 8817 Driver: "default" 8818 Config: [] 8819 Containers: {} 8820 Options: {} 8821 - Name: "host" 8822 Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" 8823 Created: "0001-01-01T00:00:00Z" 8824 Scope: "local" 8825 Driver: "host" 8826 EnableIPv6: false 8827 Internal: false 8828 Attachable: false 8829 Ingress: false 8830 IPAM: 8831 Driver: "default" 8832 Config: [] 8833 Containers: {} 8834 Options: {} 8835 500: 8836 description: "Server error" 8837 schema: 8838 $ref: "#/definitions/ErrorResponse" 8839 parameters: 8840 - name: "filters" 8841 in: "query" 8842 description: | 8843 JSON encoded value of the filters (a `map[string][]string`) to process 8844 on the networks list. 8845 8846 Available filters: 8847 8848 - `dangling=<boolean>` When set to `true` (or `1`), returns all 8849 networks that are not in use by a container. When set to `false` 8850 (or `0`), only networks that are in use by one or more 8851 containers are returned. 8852 - `driver=<driver-name>` Matches a network's driver. 8853 - `id=<network-id>` Matches all or part of a network ID. 8854 - `label=<key>` or `label=<key>=<value>` of a network label. 8855 - `name=<network-name>` Matches all or part of a network name. 8856 - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). 8857 - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. 8858 type: "string" 8859 tags: ["Network"] 8860 8861 /networks/{id}: 8862 get: 8863 summary: "Inspect a network" 8864 operationId: "NetworkInspect" 8865 produces: 8866 - "application/json" 8867 responses: 8868 200: 8869 description: "No error" 8870 schema: 8871 $ref: "#/definitions/Network" 8872 404: 8873 description: "Network not found" 8874 schema: 8875 $ref: "#/definitions/ErrorResponse" 8876 500: 8877 description: "Server error" 8878 schema: 8879 $ref: "#/definitions/ErrorResponse" 8880 parameters: 8881 - name: "id" 8882 in: "path" 8883 description: "Network ID or name" 8884 required: true 8885 type: "string" 8886 - name: "verbose" 8887 in: "query" 8888 description: "Detailed inspect output for troubleshooting" 8889 type: "boolean" 8890 default: false 8891 - name: "scope" 8892 in: "query" 8893 description: "Filter the network by scope (swarm, global, or local)" 8894 type: "string" 8895 tags: ["Network"] 8896 8897 delete: 8898 summary: "Remove a network" 8899 operationId: "NetworkDelete" 8900 responses: 8901 204: 8902 description: "No error" 8903 403: 8904 description: "operation not supported for pre-defined networks" 8905 schema: 8906 $ref: "#/definitions/ErrorResponse" 8907 404: 8908 description: "no such network" 8909 schema: 8910 $ref: "#/definitions/ErrorResponse" 8911 500: 8912 description: "Server error" 8913 schema: 8914 $ref: "#/definitions/ErrorResponse" 8915 parameters: 8916 - name: "id" 8917 in: "path" 8918 description: "Network ID or name" 8919 required: true 8920 type: "string" 8921 tags: ["Network"] 8922 8923 /networks/create: 8924 post: 8925 summary: "Create a network" 8926 operationId: "NetworkCreate" 8927 consumes: 8928 - "application/json" 8929 produces: 8930 - "application/json" 8931 responses: 8932 201: 8933 description: "No error" 8934 schema: 8935 type: "object" 8936 title: "NetworkCreateResponse" 8937 properties: 8938 Id: 8939 description: "The ID of the created network." 8940 type: "string" 8941 Warning: 8942 type: "string" 8943 example: 8944 Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" 8945 Warning: "" 8946 403: 8947 description: "operation not supported for pre-defined networks" 8948 schema: 8949 $ref: "#/definitions/ErrorResponse" 8950 404: 8951 description: "plugin not found" 8952 schema: 8953 $ref: "#/definitions/ErrorResponse" 8954 500: 8955 description: "Server error" 8956 schema: 8957 $ref: "#/definitions/ErrorResponse" 8958 parameters: 8959 - name: "networkConfig" 8960 in: "body" 8961 description: "Network configuration" 8962 required: true 8963 schema: 8964 type: "object" 8965 required: ["Name"] 8966 properties: 8967 Name: 8968 description: "The network's name." 8969 type: "string" 8970 CheckDuplicate: 8971 description: | 8972 Check for networks with duplicate names. Since Network is 8973 primarily keyed based on a random ID and not on the name, and 8974 network name is strictly a user-friendly alias to the network 8975 which is uniquely identified using ID, there is no guaranteed 8976 way to check for duplicates. CheckDuplicate is there to provide 8977 a best effort checking of any networks which has the same name 8978 but it is not guaranteed to catch all name collisions. 8979 type: "boolean" 8980 Driver: 8981 description: "Name of the network driver plugin to use." 8982 type: "string" 8983 default: "bridge" 8984 Internal: 8985 description: "Restrict external access to the network." 8986 type: "boolean" 8987 Attachable: 8988 description: | 8989 Globally scoped network is manually attachable by regular 8990 containers from workers in swarm mode. 8991 type: "boolean" 8992 Ingress: 8993 description: | 8994 Ingress network is the network which provides the routing-mesh 8995 in swarm mode. 8996 type: "boolean" 8997 IPAM: 8998 description: "Optional custom IP scheme for the network." 8999 $ref: "#/definitions/IPAM" 9000 EnableIPv6: 9001 description: "Enable IPv6 on the network." 9002 type: "boolean" 9003 Options: 9004 description: "Network specific options to be used by the drivers." 9005 type: "object" 9006 additionalProperties: 9007 type: "string" 9008 Labels: 9009 description: "User-defined key/value metadata." 9010 type: "object" 9011 additionalProperties: 9012 type: "string" 9013 example: 9014 Name: "isolated_nw" 9015 CheckDuplicate: false 9016 Driver: "bridge" 9017 EnableIPv6: true 9018 IPAM: 9019 Driver: "default" 9020 Config: 9021 - Subnet: "172.20.0.0/16" 9022 IPRange: "172.20.10.0/24" 9023 Gateway: "172.20.10.11" 9024 - Subnet: "2001:db8:abcd::/64" 9025 Gateway: "2001:db8:abcd::1011" 9026 Options: 9027 foo: "bar" 9028 Internal: true 9029 Attachable: false 9030 Ingress: false 9031 Options: 9032 com.docker.network.bridge.default_bridge: "true" 9033 com.docker.network.bridge.enable_icc: "true" 9034 com.docker.network.bridge.enable_ip_masquerade: "true" 9035 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 9036 com.docker.network.bridge.name: "docker0" 9037 com.docker.network.driver.mtu: "1500" 9038 Labels: 9039 com.example.some-label: "some-value" 9040 com.example.some-other-label: "some-other-value" 9041 tags: ["Network"] 9042 9043 /networks/{id}/connect: 9044 post: 9045 summary: "Connect a container to a network" 9046 operationId: "NetworkConnect" 9047 consumes: 9048 - "application/json" 9049 responses: 9050 200: 9051 description: "No error" 9052 403: 9053 description: "Operation not supported for swarm scoped networks" 9054 schema: 9055 $ref: "#/definitions/ErrorResponse" 9056 404: 9057 description: "Network or container not found" 9058 schema: 9059 $ref: "#/definitions/ErrorResponse" 9060 500: 9061 description: "Server error" 9062 schema: 9063 $ref: "#/definitions/ErrorResponse" 9064 parameters: 9065 - name: "id" 9066 in: "path" 9067 description: "Network ID or name" 9068 required: true 9069 type: "string" 9070 - name: "container" 9071 in: "body" 9072 required: true 9073 schema: 9074 type: "object" 9075 properties: 9076 Container: 9077 type: "string" 9078 description: "The ID or name of the container to connect to the network." 9079 EndpointConfig: 9080 $ref: "#/definitions/EndpointSettings" 9081 example: 9082 Container: "3613f73ba0e4" 9083 EndpointConfig: 9084 IPAMConfig: 9085 IPv4Address: "172.24.56.89" 9086 IPv6Address: "2001:db8::5689" 9087 tags: ["Network"] 9088 9089 /networks/{id}/disconnect: 9090 post: 9091 summary: "Disconnect a container from a network" 9092 operationId: "NetworkDisconnect" 9093 consumes: 9094 - "application/json" 9095 responses: 9096 200: 9097 description: "No error" 9098 403: 9099 description: "Operation not supported for swarm scoped networks" 9100 schema: 9101 $ref: "#/definitions/ErrorResponse" 9102 404: 9103 description: "Network or container not found" 9104 schema: 9105 $ref: "#/definitions/ErrorResponse" 9106 500: 9107 description: "Server error" 9108 schema: 9109 $ref: "#/definitions/ErrorResponse" 9110 parameters: 9111 - name: "id" 9112 in: "path" 9113 description: "Network ID or name" 9114 required: true 9115 type: "string" 9116 - name: "container" 9117 in: "body" 9118 required: true 9119 schema: 9120 type: "object" 9121 properties: 9122 Container: 9123 type: "string" 9124 description: | 9125 The ID or name of the container to disconnect from the network. 9126 Force: 9127 type: "boolean" 9128 description: | 9129 Force the container to disconnect from the network. 9130 tags: ["Network"] 9131 /networks/prune: 9132 post: 9133 summary: "Delete unused networks" 9134 produces: 9135 - "application/json" 9136 operationId: "NetworkPrune" 9137 parameters: 9138 - name: "filters" 9139 in: "query" 9140 description: | 9141 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 9142 9143 Available filters: 9144 - `until=<timestamp>` Prune networks created before this timestamp. The `<timestamp>` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. 9145 - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune networks with (or without, in case `label!=...` is used) the specified labels. 9146 type: "string" 9147 responses: 9148 200: 9149 description: "No error" 9150 schema: 9151 type: "object" 9152 title: "NetworkPruneResponse" 9153 properties: 9154 NetworksDeleted: 9155 description: "Networks that were deleted" 9156 type: "array" 9157 items: 9158 type: "string" 9159 500: 9160 description: "Server error" 9161 schema: 9162 $ref: "#/definitions/ErrorResponse" 9163 tags: ["Network"] 9164 /plugins: 9165 get: 9166 summary: "List plugins" 9167 operationId: "PluginList" 9168 description: "Returns information about installed plugins." 9169 produces: ["application/json"] 9170 responses: 9171 200: 9172 description: "No error" 9173 schema: 9174 type: "array" 9175 items: 9176 $ref: "#/definitions/Plugin" 9177 500: 9178 description: "Server error" 9179 schema: 9180 $ref: "#/definitions/ErrorResponse" 9181 parameters: 9182 - name: "filters" 9183 in: "query" 9184 type: "string" 9185 description: | 9186 A JSON encoded value of the filters (a `map[string][]string`) to 9187 process on the plugin list. 9188 9189 Available filters: 9190 9191 - `capability=<capability name>` 9192 - `enable=<true>|<false>` 9193 tags: ["Plugin"] 9194 9195 /plugins/privileges: 9196 get: 9197 summary: "Get plugin privileges" 9198 operationId: "GetPluginPrivileges" 9199 responses: 9200 200: 9201 description: "no error" 9202 schema: 9203 type: "array" 9204 items: 9205 description: | 9206 Describes a permission the user has to accept upon installing 9207 the plugin. 9208 type: "object" 9209 title: "PluginPrivilegeItem" 9210 properties: 9211 Name: 9212 type: "string" 9213 Description: 9214 type: "string" 9215 Value: 9216 type: "array" 9217 items: 9218 type: "string" 9219 example: 9220 - Name: "network" 9221 Description: "" 9222 Value: 9223 - "host" 9224 - Name: "mount" 9225 Description: "" 9226 Value: 9227 - "/data" 9228 - Name: "device" 9229 Description: "" 9230 Value: 9231 - "/dev/cpu_dma_latency" 9232 500: 9233 description: "server error" 9234 schema: 9235 $ref: "#/definitions/ErrorResponse" 9236 parameters: 9237 - name: "remote" 9238 in: "query" 9239 description: | 9240 The name of the plugin. The `:latest` tag is optional, and is the 9241 default if omitted. 9242 required: true 9243 type: "string" 9244 tags: 9245 - "Plugin" 9246 9247 /plugins/pull: 9248 post: 9249 summary: "Install a plugin" 9250 operationId: "PluginPull" 9251 description: | 9252 Pulls and installs a plugin. After the plugin is installed, it can be 9253 enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). 9254 produces: 9255 - "application/json" 9256 responses: 9257 204: 9258 description: "no error" 9259 500: 9260 description: "server error" 9261 schema: 9262 $ref: "#/definitions/ErrorResponse" 9263 parameters: 9264 - name: "remote" 9265 in: "query" 9266 description: | 9267 Remote reference for plugin to install. 9268 9269 The `:latest` tag is optional, and is used as the default if omitted. 9270 required: true 9271 type: "string" 9272 - name: "name" 9273 in: "query" 9274 description: | 9275 Local name for the pulled plugin. 9276 9277 The `:latest` tag is optional, and is used as the default if omitted. 9278 required: false 9279 type: "string" 9280 - name: "X-Registry-Auth" 9281 in: "header" 9282 description: | 9283 A base64url-encoded auth configuration to use when pulling a plugin 9284 from a registry. 9285 9286 Refer to the [authentication section](#section/Authentication) for 9287 details. 9288 type: "string" 9289 - name: "body" 9290 in: "body" 9291 schema: 9292 type: "array" 9293 items: 9294 description: | 9295 Describes a permission accepted by the user upon installing the 9296 plugin. 9297 type: "object" 9298 properties: 9299 Name: 9300 type: "string" 9301 Description: 9302 type: "string" 9303 Value: 9304 type: "array" 9305 items: 9306 type: "string" 9307 example: 9308 - Name: "network" 9309 Description: "" 9310 Value: 9311 - "host" 9312 - Name: "mount" 9313 Description: "" 9314 Value: 9315 - "/data" 9316 - Name: "device" 9317 Description: "" 9318 Value: 9319 - "/dev/cpu_dma_latency" 9320 tags: ["Plugin"] 9321 /plugins/{name}/json: 9322 get: 9323 summary: "Inspect a plugin" 9324 operationId: "PluginInspect" 9325 responses: 9326 200: 9327 description: "no error" 9328 schema: 9329 $ref: "#/definitions/Plugin" 9330 404: 9331 description: "plugin is not installed" 9332 schema: 9333 $ref: "#/definitions/ErrorResponse" 9334 500: 9335 description: "server error" 9336 schema: 9337 $ref: "#/definitions/ErrorResponse" 9338 parameters: 9339 - name: "name" 9340 in: "path" 9341 description: | 9342 The name of the plugin. The `:latest` tag is optional, and is the 9343 default if omitted. 9344 required: true 9345 type: "string" 9346 tags: ["Plugin"] 9347 /plugins/{name}: 9348 delete: 9349 summary: "Remove a plugin" 9350 operationId: "PluginDelete" 9351 responses: 9352 200: 9353 description: "no error" 9354 schema: 9355 $ref: "#/definitions/Plugin" 9356 404: 9357 description: "plugin is not installed" 9358 schema: 9359 $ref: "#/definitions/ErrorResponse" 9360 500: 9361 description: "server error" 9362 schema: 9363 $ref: "#/definitions/ErrorResponse" 9364 parameters: 9365 - name: "name" 9366 in: "path" 9367 description: | 9368 The name of the plugin. The `:latest` tag is optional, and is the 9369 default if omitted. 9370 required: true 9371 type: "string" 9372 - name: "force" 9373 in: "query" 9374 description: | 9375 Disable the plugin before removing. This may result in issues if the 9376 plugin is in use by a container. 9377 type: "boolean" 9378 default: false 9379 tags: ["Plugin"] 9380 /plugins/{name}/enable: 9381 post: 9382 summary: "Enable a plugin" 9383 operationId: "PluginEnable" 9384 responses: 9385 200: 9386 description: "no error" 9387 404: 9388 description: "plugin is not installed" 9389 schema: 9390 $ref: "#/definitions/ErrorResponse" 9391 500: 9392 description: "server error" 9393 schema: 9394 $ref: "#/definitions/ErrorResponse" 9395 parameters: 9396 - name: "name" 9397 in: "path" 9398 description: | 9399 The name of the plugin. The `:latest` tag is optional, and is the 9400 default if omitted. 9401 required: true 9402 type: "string" 9403 - name: "timeout" 9404 in: "query" 9405 description: "Set the HTTP client timeout (in seconds)" 9406 type: "integer" 9407 default: 0 9408 tags: ["Plugin"] 9409 /plugins/{name}/disable: 9410 post: 9411 summary: "Disable a plugin" 9412 operationId: "PluginDisable" 9413 responses: 9414 200: 9415 description: "no error" 9416 404: 9417 description: "plugin is not installed" 9418 schema: 9419 $ref: "#/definitions/ErrorResponse" 9420 500: 9421 description: "server error" 9422 schema: 9423 $ref: "#/definitions/ErrorResponse" 9424 parameters: 9425 - name: "name" 9426 in: "path" 9427 description: | 9428 The name of the plugin. The `:latest` tag is optional, and is the 9429 default if omitted. 9430 required: true 9431 type: "string" 9432 tags: ["Plugin"] 9433 /plugins/{name}/upgrade: 9434 post: 9435 summary: "Upgrade a plugin" 9436 operationId: "PluginUpgrade" 9437 responses: 9438 204: 9439 description: "no error" 9440 404: 9441 description: "plugin not installed" 9442 schema: 9443 $ref: "#/definitions/ErrorResponse" 9444 500: 9445 description: "server error" 9446 schema: 9447 $ref: "#/definitions/ErrorResponse" 9448 parameters: 9449 - name: "name" 9450 in: "path" 9451 description: | 9452 The name of the plugin. The `:latest` tag is optional, and is the 9453 default if omitted. 9454 required: true 9455 type: "string" 9456 - name: "remote" 9457 in: "query" 9458 description: | 9459 Remote reference to upgrade to. 9460 9461 The `:latest` tag is optional, and is used as the default if omitted. 9462 required: true 9463 type: "string" 9464 - name: "X-Registry-Auth" 9465 in: "header" 9466 description: | 9467 A base64url-encoded auth configuration to use when pulling a plugin 9468 from a registry. 9469 9470 Refer to the [authentication section](#section/Authentication) for 9471 details. 9472 type: "string" 9473 - name: "body" 9474 in: "body" 9475 schema: 9476 type: "array" 9477 items: 9478 description: | 9479 Describes a permission accepted by the user upon installing the 9480 plugin. 9481 type: "object" 9482 properties: 9483 Name: 9484 type: "string" 9485 Description: 9486 type: "string" 9487 Value: 9488 type: "array" 9489 items: 9490 type: "string" 9491 example: 9492 - Name: "network" 9493 Description: "" 9494 Value: 9495 - "host" 9496 - Name: "mount" 9497 Description: "" 9498 Value: 9499 - "/data" 9500 - Name: "device" 9501 Description: "" 9502 Value: 9503 - "/dev/cpu_dma_latency" 9504 tags: ["Plugin"] 9505 /plugins/create: 9506 post: 9507 summary: "Create a plugin" 9508 operationId: "PluginCreate" 9509 consumes: 9510 - "application/x-tar" 9511 responses: 9512 204: 9513 description: "no error" 9514 500: 9515 description: "server error" 9516 schema: 9517 $ref: "#/definitions/ErrorResponse" 9518 parameters: 9519 - name: "name" 9520 in: "query" 9521 description: | 9522 The name of the plugin. The `:latest` tag is optional, and is the 9523 default if omitted. 9524 required: true 9525 type: "string" 9526 - name: "tarContext" 9527 in: "body" 9528 description: "Path to tar containing plugin rootfs and manifest" 9529 schema: 9530 type: "string" 9531 format: "binary" 9532 tags: ["Plugin"] 9533 /plugins/{name}/push: 9534 post: 9535 summary: "Push a plugin" 9536 operationId: "PluginPush" 9537 description: | 9538 Push a plugin to the registry. 9539 parameters: 9540 - name: "name" 9541 in: "path" 9542 description: | 9543 The name of the plugin. The `:latest` tag is optional, and is the 9544 default if omitted. 9545 required: true 9546 type: "string" 9547 responses: 9548 200: 9549 description: "no error" 9550 404: 9551 description: "plugin not installed" 9552 schema: 9553 $ref: "#/definitions/ErrorResponse" 9554 500: 9555 description: "server error" 9556 schema: 9557 $ref: "#/definitions/ErrorResponse" 9558 tags: ["Plugin"] 9559 /plugins/{name}/set: 9560 post: 9561 summary: "Configure a plugin" 9562 operationId: "PluginSet" 9563 consumes: 9564 - "application/json" 9565 parameters: 9566 - name: "name" 9567 in: "path" 9568 description: | 9569 The name of the plugin. The `:latest` tag is optional, and is the 9570 default if omitted. 9571 required: true 9572 type: "string" 9573 - name: "body" 9574 in: "body" 9575 schema: 9576 type: "array" 9577 items: 9578 type: "string" 9579 example: ["DEBUG=1"] 9580 responses: 9581 204: 9582 description: "No error" 9583 404: 9584 description: "Plugin not installed" 9585 schema: 9586 $ref: "#/definitions/ErrorResponse" 9587 500: 9588 description: "Server error" 9589 schema: 9590 $ref: "#/definitions/ErrorResponse" 9591 tags: ["Plugin"] 9592 /nodes: 9593 get: 9594 summary: "List nodes" 9595 operationId: "NodeList" 9596 responses: 9597 200: 9598 description: "no error" 9599 schema: 9600 type: "array" 9601 items: 9602 $ref: "#/definitions/Node" 9603 500: 9604 description: "server error" 9605 schema: 9606 $ref: "#/definitions/ErrorResponse" 9607 503: 9608 description: "node is not part of a swarm" 9609 schema: 9610 $ref: "#/definitions/ErrorResponse" 9611 parameters: 9612 - name: "filters" 9613 in: "query" 9614 description: | 9615 Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). 9616 9617 Available filters: 9618 - `id=<node id>` 9619 - `label=<engine label>` 9620 - `membership=`(`accepted`|`pending`)` 9621 - `name=<node name>` 9622 - `node.label=<node label>` 9623 - `role=`(`manager`|`worker`)` 9624 type: "string" 9625 tags: ["Node"] 9626 /nodes/{id}: 9627 get: 9628 summary: "Inspect a node" 9629 operationId: "NodeInspect" 9630 responses: 9631 200: 9632 description: "no error" 9633 schema: 9634 $ref: "#/definitions/Node" 9635 404: 9636 description: "no such node" 9637 schema: 9638 $ref: "#/definitions/ErrorResponse" 9639 500: 9640 description: "server error" 9641 schema: 9642 $ref: "#/definitions/ErrorResponse" 9643 503: 9644 description: "node is not part of a swarm" 9645 schema: 9646 $ref: "#/definitions/ErrorResponse" 9647 parameters: 9648 - name: "id" 9649 in: "path" 9650 description: "The ID or name of the node" 9651 type: "string" 9652 required: true 9653 tags: ["Node"] 9654 delete: 9655 summary: "Delete a node" 9656 operationId: "NodeDelete" 9657 responses: 9658 200: 9659 description: "no error" 9660 404: 9661 description: "no such node" 9662 schema: 9663 $ref: "#/definitions/ErrorResponse" 9664 500: 9665 description: "server error" 9666 schema: 9667 $ref: "#/definitions/ErrorResponse" 9668 503: 9669 description: "node is not part of a swarm" 9670 schema: 9671 $ref: "#/definitions/ErrorResponse" 9672 parameters: 9673 - name: "id" 9674 in: "path" 9675 description: "The ID or name of the node" 9676 type: "string" 9677 required: true 9678 - name: "force" 9679 in: "query" 9680 description: "Force remove a node from the swarm" 9681 default: false 9682 type: "boolean" 9683 tags: ["Node"] 9684 /nodes/{id}/update: 9685 post: 9686 summary: "Update a node" 9687 operationId: "NodeUpdate" 9688 responses: 9689 200: 9690 description: "no error" 9691 400: 9692 description: "bad parameter" 9693 schema: 9694 $ref: "#/definitions/ErrorResponse" 9695 404: 9696 description: "no such node" 9697 schema: 9698 $ref: "#/definitions/ErrorResponse" 9699 500: 9700 description: "server error" 9701 schema: 9702 $ref: "#/definitions/ErrorResponse" 9703 503: 9704 description: "node is not part of a swarm" 9705 schema: 9706 $ref: "#/definitions/ErrorResponse" 9707 parameters: 9708 - name: "id" 9709 in: "path" 9710 description: "The ID of the node" 9711 type: "string" 9712 required: true 9713 - name: "body" 9714 in: "body" 9715 schema: 9716 $ref: "#/definitions/NodeSpec" 9717 - name: "version" 9718 in: "query" 9719 description: | 9720 The version number of the node object being updated. This is required 9721 to avoid conflicting writes. 9722 type: "integer" 9723 format: "int64" 9724 required: true 9725 tags: ["Node"] 9726 /swarm: 9727 get: 9728 summary: "Inspect swarm" 9729 operationId: "SwarmInspect" 9730 responses: 9731 200: 9732 description: "no error" 9733 schema: 9734 $ref: "#/definitions/Swarm" 9735 404: 9736 description: "no such swarm" 9737 schema: 9738 $ref: "#/definitions/ErrorResponse" 9739 500: 9740 description: "server error" 9741 schema: 9742 $ref: "#/definitions/ErrorResponse" 9743 503: 9744 description: "node is not part of a swarm" 9745 schema: 9746 $ref: "#/definitions/ErrorResponse" 9747 tags: ["Swarm"] 9748 /swarm/init: 9749 post: 9750 summary: "Initialize a new swarm" 9751 operationId: "SwarmInit" 9752 produces: 9753 - "application/json" 9754 - "text/plain" 9755 responses: 9756 200: 9757 description: "no error" 9758 schema: 9759 description: "The node ID" 9760 type: "string" 9761 example: "7v2t30z9blmxuhnyo6s4cpenp" 9762 400: 9763 description: "bad parameter" 9764 schema: 9765 $ref: "#/definitions/ErrorResponse" 9766 500: 9767 description: "server error" 9768 schema: 9769 $ref: "#/definitions/ErrorResponse" 9770 503: 9771 description: "node is already part of a swarm" 9772 schema: 9773 $ref: "#/definitions/ErrorResponse" 9774 parameters: 9775 - name: "body" 9776 in: "body" 9777 required: true 9778 schema: 9779 type: "object" 9780 properties: 9781 ListenAddr: 9782 description: | 9783 Listen address used for inter-manager communication, as well 9784 as determining the networking interface used for the VXLAN 9785 Tunnel Endpoint (VTEP). This can either be an address/port 9786 combination in the form `192.168.1.1:4567`, or an interface 9787 followed by a port number, like `eth0:4567`. If the port number 9788 is omitted, the default swarm listening port is used. 9789 type: "string" 9790 AdvertiseAddr: 9791 description: | 9792 Externally reachable address advertised to other nodes. This 9793 can either be an address/port combination in the form 9794 `192.168.1.1:4567`, or an interface followed by a port number, 9795 like `eth0:4567`. If the port number is omitted, the port 9796 number from the listen address is used. If `AdvertiseAddr` is 9797 not specified, it will be automatically detected when possible. 9798 type: "string" 9799 DataPathAddr: 9800 description: | 9801 Address or interface to use for data path traffic (format: 9802 `<ip|interface>`), for example, `192.168.1.1`, or an interface, 9803 like `eth0`. If `DataPathAddr` is unspecified, the same address 9804 as `AdvertiseAddr` is used. 9805 9806 The `DataPathAddr` specifies the address that global scope 9807 network drivers will publish towards other nodes in order to 9808 reach the containers running on this node. Using this parameter 9809 it is possible to separate the container data traffic from the 9810 management traffic of the cluster. 9811 type: "string" 9812 DataPathPort: 9813 description: | 9814 DataPathPort specifies the data path port number for data traffic. 9815 Acceptable port range is 1024 to 49151. 9816 if no port is set or is set to 0, default port 4789 will be used. 9817 type: "integer" 9818 format: "uint32" 9819 DefaultAddrPool: 9820 description: | 9821 Default Address Pool specifies default subnet pools for global 9822 scope networks. 9823 type: "array" 9824 items: 9825 type: "string" 9826 example: ["10.10.0.0/16", "20.20.0.0/16"] 9827 ForceNewCluster: 9828 description: "Force creation of a new swarm." 9829 type: "boolean" 9830 SubnetSize: 9831 description: | 9832 SubnetSize specifies the subnet size of the networks created 9833 from the default subnet pool. 9834 type: "integer" 9835 format: "uint32" 9836 Spec: 9837 $ref: "#/definitions/SwarmSpec" 9838 example: 9839 ListenAddr: "0.0.0.0:2377" 9840 AdvertiseAddr: "192.168.1.1:2377" 9841 DataPathPort: 4789 9842 DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"] 9843 SubnetSize: 24 9844 ForceNewCluster: false 9845 Spec: 9846 Orchestration: {} 9847 Raft: {} 9848 Dispatcher: {} 9849 CAConfig: {} 9850 EncryptionConfig: 9851 AutoLockManagers: false 9852 tags: ["Swarm"] 9853 /swarm/join: 9854 post: 9855 summary: "Join an existing swarm" 9856 operationId: "SwarmJoin" 9857 responses: 9858 200: 9859 description: "no error" 9860 400: 9861 description: "bad parameter" 9862 schema: 9863 $ref: "#/definitions/ErrorResponse" 9864 500: 9865 description: "server error" 9866 schema: 9867 $ref: "#/definitions/ErrorResponse" 9868 503: 9869 description: "node is already part of a swarm" 9870 schema: 9871 $ref: "#/definitions/ErrorResponse" 9872 parameters: 9873 - name: "body" 9874 in: "body" 9875 required: true 9876 schema: 9877 type: "object" 9878 properties: 9879 ListenAddr: 9880 description: | 9881 Listen address used for inter-manager communication if the node 9882 gets promoted to manager, as well as determining the networking 9883 interface used for the VXLAN Tunnel Endpoint (VTEP). 9884 type: "string" 9885 AdvertiseAddr: 9886 description: | 9887 Externally reachable address advertised to other nodes. This 9888 can either be an address/port combination in the form 9889 `192.168.1.1:4567`, or an interface followed by a port number, 9890 like `eth0:4567`. If the port number is omitted, the port 9891 number from the listen address is used. If `AdvertiseAddr` is 9892 not specified, it will be automatically detected when possible. 9893 type: "string" 9894 DataPathAddr: 9895 description: | 9896 Address or interface to use for data path traffic (format: 9897 `<ip|interface>`), for example, `192.168.1.1`, or an interface, 9898 like `eth0`. If `DataPathAddr` is unspecified, the same addres 9899 as `AdvertiseAddr` is used. 9900 9901 The `DataPathAddr` specifies the address that global scope 9902 network drivers will publish towards other nodes in order to 9903 reach the containers running on this node. Using this parameter 9904 it is possible to separate the container data traffic from the 9905 management traffic of the cluster. 9906 9907 type: "string" 9908 RemoteAddrs: 9909 description: | 9910 Addresses of manager nodes already participating in the swarm. 9911 type: "array" 9912 items: 9913 type: "string" 9914 JoinToken: 9915 description: "Secret token for joining this swarm." 9916 type: "string" 9917 example: 9918 ListenAddr: "0.0.0.0:2377" 9919 AdvertiseAddr: "192.168.1.1:2377" 9920 RemoteAddrs: 9921 - "node1:2377" 9922 JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 9923 tags: ["Swarm"] 9924 /swarm/leave: 9925 post: 9926 summary: "Leave a swarm" 9927 operationId: "SwarmLeave" 9928 responses: 9929 200: 9930 description: "no error" 9931 500: 9932 description: "server error" 9933 schema: 9934 $ref: "#/definitions/ErrorResponse" 9935 503: 9936 description: "node is not part of a swarm" 9937 schema: 9938 $ref: "#/definitions/ErrorResponse" 9939 parameters: 9940 - name: "force" 9941 description: | 9942 Force leave swarm, even if this is the last manager or that it will 9943 break the cluster. 9944 in: "query" 9945 type: "boolean" 9946 default: false 9947 tags: ["Swarm"] 9948 /swarm/update: 9949 post: 9950 summary: "Update a swarm" 9951 operationId: "SwarmUpdate" 9952 responses: 9953 200: 9954 description: "no error" 9955 400: 9956 description: "bad parameter" 9957 schema: 9958 $ref: "#/definitions/ErrorResponse" 9959 500: 9960 description: "server error" 9961 schema: 9962 $ref: "#/definitions/ErrorResponse" 9963 503: 9964 description: "node is not part of a swarm" 9965 schema: 9966 $ref: "#/definitions/ErrorResponse" 9967 parameters: 9968 - name: "body" 9969 in: "body" 9970 required: true 9971 schema: 9972 $ref: "#/definitions/SwarmSpec" 9973 - name: "version" 9974 in: "query" 9975 description: | 9976 The version number of the swarm object being updated. This is 9977 required to avoid conflicting writes. 9978 type: "integer" 9979 format: "int64" 9980 required: true 9981 - name: "rotateWorkerToken" 9982 in: "query" 9983 description: "Rotate the worker join token." 9984 type: "boolean" 9985 default: false 9986 - name: "rotateManagerToken" 9987 in: "query" 9988 description: "Rotate the manager join token." 9989 type: "boolean" 9990 default: false 9991 - name: "rotateManagerUnlockKey" 9992 in: "query" 9993 description: "Rotate the manager unlock key." 9994 type: "boolean" 9995 default: false 9996 tags: ["Swarm"] 9997 /swarm/unlockkey: 9998 get: 9999 summary: "Get the unlock key" 10000 operationId: "SwarmUnlockkey" 10001 consumes: 10002 - "application/json" 10003 responses: 10004 200: 10005 description: "no error" 10006 schema: 10007 type: "object" 10008 title: "UnlockKeyResponse" 10009 properties: 10010 UnlockKey: 10011 description: "The swarm's unlock key." 10012 type: "string" 10013 example: 10014 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 10015 500: 10016 description: "server error" 10017 schema: 10018 $ref: "#/definitions/ErrorResponse" 10019 503: 10020 description: "node is not part of a swarm" 10021 schema: 10022 $ref: "#/definitions/ErrorResponse" 10023 tags: ["Swarm"] 10024 /swarm/unlock: 10025 post: 10026 summary: "Unlock a locked manager" 10027 operationId: "SwarmUnlock" 10028 consumes: 10029 - "application/json" 10030 produces: 10031 - "application/json" 10032 parameters: 10033 - name: "body" 10034 in: "body" 10035 required: true 10036 schema: 10037 type: "object" 10038 properties: 10039 UnlockKey: 10040 description: "The swarm's unlock key." 10041 type: "string" 10042 example: 10043 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 10044 responses: 10045 200: 10046 description: "no error" 10047 500: 10048 description: "server error" 10049 schema: 10050 $ref: "#/definitions/ErrorResponse" 10051 503: 10052 description: "node is not part of a swarm" 10053 schema: 10054 $ref: "#/definitions/ErrorResponse" 10055 tags: ["Swarm"] 10056 /services: 10057 get: 10058 summary: "List services" 10059 operationId: "ServiceList" 10060 responses: 10061 200: 10062 description: "no error" 10063 schema: 10064 type: "array" 10065 items: 10066 $ref: "#/definitions/Service" 10067 500: 10068 description: "server error" 10069 schema: 10070 $ref: "#/definitions/ErrorResponse" 10071 503: 10072 description: "node is not part of a swarm" 10073 schema: 10074 $ref: "#/definitions/ErrorResponse" 10075 parameters: 10076 - name: "filters" 10077 in: "query" 10078 type: "string" 10079 description: | 10080 A JSON encoded value of the filters (a `map[string][]string`) to 10081 process on the services list. 10082 10083 Available filters: 10084 10085 - `id=<service id>` 10086 - `label=<service label>` 10087 - `mode=["replicated"|"global"]` 10088 - `name=<service name>` 10089 - name: "status" 10090 in: "query" 10091 type: "boolean" 10092 description: | 10093 Include service status, with count of running and desired tasks. 10094 tags: ["Service"] 10095 /services/create: 10096 post: 10097 summary: "Create a service" 10098 operationId: "ServiceCreate" 10099 consumes: 10100 - "application/json" 10101 produces: 10102 - "application/json" 10103 responses: 10104 201: 10105 description: "no error" 10106 schema: 10107 type: "object" 10108 title: "ServiceCreateResponse" 10109 properties: 10110 ID: 10111 description: "The ID of the created service." 10112 type: "string" 10113 Warning: 10114 description: "Optional warning message" 10115 type: "string" 10116 example: 10117 ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" 10118 Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" 10119 400: 10120 description: "bad parameter" 10121 schema: 10122 $ref: "#/definitions/ErrorResponse" 10123 403: 10124 description: "network is not eligible for services" 10125 schema: 10126 $ref: "#/definitions/ErrorResponse" 10127 409: 10128 description: "name conflicts with an existing service" 10129 schema: 10130 $ref: "#/definitions/ErrorResponse" 10131 500: 10132 description: "server error" 10133 schema: 10134 $ref: "#/definitions/ErrorResponse" 10135 503: 10136 description: "node is not part of a swarm" 10137 schema: 10138 $ref: "#/definitions/ErrorResponse" 10139 parameters: 10140 - name: "body" 10141 in: "body" 10142 required: true 10143 schema: 10144 allOf: 10145 - $ref: "#/definitions/ServiceSpec" 10146 - type: "object" 10147 example: 10148 Name: "web" 10149 TaskTemplate: 10150 ContainerSpec: 10151 Image: "nginx:alpine" 10152 Mounts: 10153 - 10154 ReadOnly: true 10155 Source: "web-data" 10156 Target: "/usr/share/nginx/html" 10157 Type: "volume" 10158 VolumeOptions: 10159 DriverConfig: {} 10160 Labels: 10161 com.example.something: "something-value" 10162 Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"] 10163 User: "33" 10164 DNSConfig: 10165 Nameservers: ["8.8.8.8"] 10166 Search: ["example.org"] 10167 Options: ["timeout:3"] 10168 Secrets: 10169 - 10170 File: 10171 Name: "www.example.org.key" 10172 UID: "33" 10173 GID: "33" 10174 Mode: 384 10175 SecretID: "fpjqlhnwb19zds35k8wn80lq9" 10176 SecretName: "example_org_domain_key" 10177 LogDriver: 10178 Name: "json-file" 10179 Options: 10180 max-file: "3" 10181 max-size: "10M" 10182 Placement: {} 10183 Resources: 10184 Limits: 10185 MemoryBytes: 104857600 10186 Reservations: {} 10187 RestartPolicy: 10188 Condition: "on-failure" 10189 Delay: 10000000000 10190 MaxAttempts: 10 10191 Mode: 10192 Replicated: 10193 Replicas: 4 10194 UpdateConfig: 10195 Parallelism: 2 10196 Delay: 1000000000 10197 FailureAction: "pause" 10198 Monitor: 15000000000 10199 MaxFailureRatio: 0.15 10200 RollbackConfig: 10201 Parallelism: 1 10202 Delay: 1000000000 10203 FailureAction: "pause" 10204 Monitor: 15000000000 10205 MaxFailureRatio: 0.15 10206 EndpointSpec: 10207 Ports: 10208 - 10209 Protocol: "tcp" 10210 PublishedPort: 8080 10211 TargetPort: 80 10212 Labels: 10213 foo: "bar" 10214 - name: "X-Registry-Auth" 10215 in: "header" 10216 description: | 10217 A base64url-encoded auth configuration for pulling from private 10218 registries. 10219 10220 Refer to the [authentication section](#section/Authentication) for 10221 details. 10222 type: "string" 10223 tags: ["Service"] 10224 /services/{id}: 10225 get: 10226 summary: "Inspect a service" 10227 operationId: "ServiceInspect" 10228 responses: 10229 200: 10230 description: "no error" 10231 schema: 10232 $ref: "#/definitions/Service" 10233 404: 10234 description: "no such service" 10235 schema: 10236 $ref: "#/definitions/ErrorResponse" 10237 500: 10238 description: "server error" 10239 schema: 10240 $ref: "#/definitions/ErrorResponse" 10241 503: 10242 description: "node is not part of a swarm" 10243 schema: 10244 $ref: "#/definitions/ErrorResponse" 10245 parameters: 10246 - name: "id" 10247 in: "path" 10248 description: "ID or name of service." 10249 required: true 10250 type: "string" 10251 - name: "insertDefaults" 10252 in: "query" 10253 description: "Fill empty fields with default values." 10254 type: "boolean" 10255 default: false 10256 tags: ["Service"] 10257 delete: 10258 summary: "Delete a service" 10259 operationId: "ServiceDelete" 10260 responses: 10261 200: 10262 description: "no error" 10263 404: 10264 description: "no such service" 10265 schema: 10266 $ref: "#/definitions/ErrorResponse" 10267 500: 10268 description: "server error" 10269 schema: 10270 $ref: "#/definitions/ErrorResponse" 10271 503: 10272 description: "node is not part of a swarm" 10273 schema: 10274 $ref: "#/definitions/ErrorResponse" 10275 parameters: 10276 - name: "id" 10277 in: "path" 10278 description: "ID or name of service." 10279 required: true 10280 type: "string" 10281 tags: ["Service"] 10282 /services/{id}/update: 10283 post: 10284 summary: "Update a service" 10285 operationId: "ServiceUpdate" 10286 consumes: ["application/json"] 10287 produces: ["application/json"] 10288 responses: 10289 200: 10290 description: "no error" 10291 schema: 10292 $ref: "#/definitions/ServiceUpdateResponse" 10293 400: 10294 description: "bad parameter" 10295 schema: 10296 $ref: "#/definitions/ErrorResponse" 10297 404: 10298 description: "no such service" 10299 schema: 10300 $ref: "#/definitions/ErrorResponse" 10301 500: 10302 description: "server error" 10303 schema: 10304 $ref: "#/definitions/ErrorResponse" 10305 503: 10306 description: "node is not part of a swarm" 10307 schema: 10308 $ref: "#/definitions/ErrorResponse" 10309 parameters: 10310 - name: "id" 10311 in: "path" 10312 description: "ID or name of service." 10313 required: true 10314 type: "string" 10315 - name: "body" 10316 in: "body" 10317 required: true 10318 schema: 10319 allOf: 10320 - $ref: "#/definitions/ServiceSpec" 10321 - type: "object" 10322 example: 10323 Name: "top" 10324 TaskTemplate: 10325 ContainerSpec: 10326 Image: "busybox" 10327 Args: 10328 - "top" 10329 Resources: 10330 Limits: {} 10331 Reservations: {} 10332 RestartPolicy: 10333 Condition: "any" 10334 MaxAttempts: 0 10335 Placement: {} 10336 ForceUpdate: 0 10337 Mode: 10338 Replicated: 10339 Replicas: 1 10340 UpdateConfig: 10341 Parallelism: 2 10342 Delay: 1000000000 10343 FailureAction: "pause" 10344 Monitor: 15000000000 10345 MaxFailureRatio: 0.15 10346 RollbackConfig: 10347 Parallelism: 1 10348 Delay: 1000000000 10349 FailureAction: "pause" 10350 Monitor: 15000000000 10351 MaxFailureRatio: 0.15 10352 EndpointSpec: 10353 Mode: "vip" 10354 10355 - name: "version" 10356 in: "query" 10357 description: | 10358 The version number of the service object being updated. This is 10359 required to avoid conflicting writes. 10360 This version number should be the value as currently set on the 10361 service *before* the update. You can find the current version by 10362 calling `GET /services/{id}` 10363 required: true 10364 type: "integer" 10365 - name: "registryAuthFrom" 10366 in: "query" 10367 description: | 10368 If the `X-Registry-Auth` header is not specified, this parameter 10369 indicates where to find registry authorization credentials. 10370 type: "string" 10371 enum: ["spec", "previous-spec"] 10372 default: "spec" 10373 - name: "rollback" 10374 in: "query" 10375 description: | 10376 Set to this parameter to `previous` to cause a server-side rollback 10377 to the previous service spec. The supplied spec will be ignored in 10378 this case. 10379 type: "string" 10380 - name: "X-Registry-Auth" 10381 in: "header" 10382 description: | 10383 A base64url-encoded auth configuration for pulling from private 10384 registries. 10385 10386 Refer to the [authentication section](#section/Authentication) for 10387 details. 10388 type: "string" 10389 10390 tags: ["Service"] 10391 /services/{id}/logs: 10392 get: 10393 summary: "Get service logs" 10394 description: | 10395 Get `stdout` and `stderr` logs from a service. See also 10396 [`/containers/{id}/logs`](#operation/ContainerLogs). 10397 10398 **Note**: This endpoint works only for services with the `local`, 10399 `json-file` or `journald` logging drivers. 10400 operationId: "ServiceLogs" 10401 responses: 10402 200: 10403 description: "logs returned as a stream in response body" 10404 schema: 10405 type: "string" 10406 format: "binary" 10407 404: 10408 description: "no such service" 10409 schema: 10410 $ref: "#/definitions/ErrorResponse" 10411 examples: 10412 application/json: 10413 message: "No such service: c2ada9df5af8" 10414 500: 10415 description: "server error" 10416 schema: 10417 $ref: "#/definitions/ErrorResponse" 10418 503: 10419 description: "node is not part of a swarm" 10420 schema: 10421 $ref: "#/definitions/ErrorResponse" 10422 parameters: 10423 - name: "id" 10424 in: "path" 10425 required: true 10426 description: "ID or name of the service" 10427 type: "string" 10428 - name: "details" 10429 in: "query" 10430 description: "Show service context and extra details provided to logs." 10431 type: "boolean" 10432 default: false 10433 - name: "follow" 10434 in: "query" 10435 description: "Keep connection after returning logs." 10436 type: "boolean" 10437 default: false 10438 - name: "stdout" 10439 in: "query" 10440 description: "Return logs from `stdout`" 10441 type: "boolean" 10442 default: false 10443 - name: "stderr" 10444 in: "query" 10445 description: "Return logs from `stderr`" 10446 type: "boolean" 10447 default: false 10448 - name: "since" 10449 in: "query" 10450 description: "Only return logs since this time, as a UNIX timestamp" 10451 type: "integer" 10452 default: 0 10453 - name: "timestamps" 10454 in: "query" 10455 description: "Add timestamps to every log line" 10456 type: "boolean" 10457 default: false 10458 - name: "tail" 10459 in: "query" 10460 description: | 10461 Only return this number of log lines from the end of the logs. 10462 Specify as an integer or `all` to output all log lines. 10463 type: "string" 10464 default: "all" 10465 tags: ["Service"] 10466 /tasks: 10467 get: 10468 summary: "List tasks" 10469 operationId: "TaskList" 10470 produces: 10471 - "application/json" 10472 responses: 10473 200: 10474 description: "no error" 10475 schema: 10476 type: "array" 10477 items: 10478 $ref: "#/definitions/Task" 10479 example: 10480 - ID: "0kzzo1i0y4jz6027t0k7aezc7" 10481 Version: 10482 Index: 71 10483 CreatedAt: "2016-06-07T21:07:31.171892745Z" 10484 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 10485 Spec: 10486 ContainerSpec: 10487 Image: "redis" 10488 Resources: 10489 Limits: {} 10490 Reservations: {} 10491 RestartPolicy: 10492 Condition: "any" 10493 MaxAttempts: 0 10494 Placement: {} 10495 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 10496 Slot: 1 10497 NodeID: "60gvrl6tm78dmak4yl7srz94v" 10498 Status: 10499 Timestamp: "2016-06-07T21:07:31.290032978Z" 10500 State: "running" 10501 Message: "started" 10502 ContainerStatus: 10503 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 10504 PID: 677 10505 DesiredState: "running" 10506 NetworksAttachments: 10507 - Network: 10508 ID: "4qvuz4ko70xaltuqbt8956gd1" 10509 Version: 10510 Index: 18 10511 CreatedAt: "2016-06-07T20:31:11.912919752Z" 10512 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 10513 Spec: 10514 Name: "ingress" 10515 Labels: 10516 com.docker.swarm.internal: "true" 10517 DriverConfiguration: {} 10518 IPAMOptions: 10519 Driver: {} 10520 Configs: 10521 - Subnet: "10.255.0.0/16" 10522 Gateway: "10.255.0.1" 10523 DriverState: 10524 Name: "overlay" 10525 Options: 10526 com.docker.network.driver.overlay.vxlanid_list: "256" 10527 IPAMOptions: 10528 Driver: 10529 Name: "default" 10530 Configs: 10531 - Subnet: "10.255.0.0/16" 10532 Gateway: "10.255.0.1" 10533 Addresses: 10534 - "10.255.0.10/16" 10535 - ID: "1yljwbmlr8er2waf8orvqpwms" 10536 Version: 10537 Index: 30 10538 CreatedAt: "2016-06-07T21:07:30.019104782Z" 10539 UpdatedAt: "2016-06-07T21:07:30.231958098Z" 10540 Name: "hopeful_cori" 10541 Spec: 10542 ContainerSpec: 10543 Image: "redis" 10544 Resources: 10545 Limits: {} 10546 Reservations: {} 10547 RestartPolicy: 10548 Condition: "any" 10549 MaxAttempts: 0 10550 Placement: {} 10551 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 10552 Slot: 1 10553 NodeID: "60gvrl6tm78dmak4yl7srz94v" 10554 Status: 10555 Timestamp: "2016-06-07T21:07:30.202183143Z" 10556 State: "shutdown" 10557 Message: "shutdown" 10558 ContainerStatus: 10559 ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" 10560 DesiredState: "shutdown" 10561 NetworksAttachments: 10562 - Network: 10563 ID: "4qvuz4ko70xaltuqbt8956gd1" 10564 Version: 10565 Index: 18 10566 CreatedAt: "2016-06-07T20:31:11.912919752Z" 10567 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 10568 Spec: 10569 Name: "ingress" 10570 Labels: 10571 com.docker.swarm.internal: "true" 10572 DriverConfiguration: {} 10573 IPAMOptions: 10574 Driver: {} 10575 Configs: 10576 - Subnet: "10.255.0.0/16" 10577 Gateway: "10.255.0.1" 10578 DriverState: 10579 Name: "overlay" 10580 Options: 10581 com.docker.network.driver.overlay.vxlanid_list: "256" 10582 IPAMOptions: 10583 Driver: 10584 Name: "default" 10585 Configs: 10586 - Subnet: "10.255.0.0/16" 10587 Gateway: "10.255.0.1" 10588 Addresses: 10589 - "10.255.0.5/16" 10590 500: 10591 description: "server error" 10592 schema: 10593 $ref: "#/definitions/ErrorResponse" 10594 503: 10595 description: "node is not part of a swarm" 10596 schema: 10597 $ref: "#/definitions/ErrorResponse" 10598 parameters: 10599 - name: "filters" 10600 in: "query" 10601 type: "string" 10602 description: | 10603 A JSON encoded value of the filters (a `map[string][]string`) to 10604 process on the tasks list. 10605 10606 Available filters: 10607 10608 - `desired-state=(running | shutdown | accepted)` 10609 - `id=<task id>` 10610 - `label=key` or `label="key=value"` 10611 - `name=<task name>` 10612 - `node=<node id or name>` 10613 - `service=<service name>` 10614 tags: ["Task"] 10615 /tasks/{id}: 10616 get: 10617 summary: "Inspect a task" 10618 operationId: "TaskInspect" 10619 produces: 10620 - "application/json" 10621 responses: 10622 200: 10623 description: "no error" 10624 schema: 10625 $ref: "#/definitions/Task" 10626 404: 10627 description: "no such task" 10628 schema: 10629 $ref: "#/definitions/ErrorResponse" 10630 500: 10631 description: "server error" 10632 schema: 10633 $ref: "#/definitions/ErrorResponse" 10634 503: 10635 description: "node is not part of a swarm" 10636 schema: 10637 $ref: "#/definitions/ErrorResponse" 10638 parameters: 10639 - name: "id" 10640 in: "path" 10641 description: "ID of the task" 10642 required: true 10643 type: "string" 10644 tags: ["Task"] 10645 /tasks/{id}/logs: 10646 get: 10647 summary: "Get task logs" 10648 description: | 10649 Get `stdout` and `stderr` logs from a task. 10650 See also [`/containers/{id}/logs`](#operation/ContainerLogs). 10651 10652 **Note**: This endpoint works only for services with the `local`, 10653 `json-file` or `journald` logging drivers. 10654 operationId: "TaskLogs" 10655 responses: 10656 200: 10657 description: "logs returned as a stream in response body" 10658 schema: 10659 type: "string" 10660 format: "binary" 10661 404: 10662 description: "no such task" 10663 schema: 10664 $ref: "#/definitions/ErrorResponse" 10665 examples: 10666 application/json: 10667 message: "No such task: c2ada9df5af8" 10668 500: 10669 description: "server error" 10670 schema: 10671 $ref: "#/definitions/ErrorResponse" 10672 503: 10673 description: "node is not part of a swarm" 10674 schema: 10675 $ref: "#/definitions/ErrorResponse" 10676 parameters: 10677 - name: "id" 10678 in: "path" 10679 required: true 10680 description: "ID of the task" 10681 type: "string" 10682 - name: "details" 10683 in: "query" 10684 description: "Show task context and extra details provided to logs." 10685 type: "boolean" 10686 default: false 10687 - name: "follow" 10688 in: "query" 10689 description: "Keep connection after returning logs." 10690 type: "boolean" 10691 default: false 10692 - name: "stdout" 10693 in: "query" 10694 description: "Return logs from `stdout`" 10695 type: "boolean" 10696 default: false 10697 - name: "stderr" 10698 in: "query" 10699 description: "Return logs from `stderr`" 10700 type: "boolean" 10701 default: false 10702 - name: "since" 10703 in: "query" 10704 description: "Only return logs since this time, as a UNIX timestamp" 10705 type: "integer" 10706 default: 0 10707 - name: "timestamps" 10708 in: "query" 10709 description: "Add timestamps to every log line" 10710 type: "boolean" 10711 default: false 10712 - name: "tail" 10713 in: "query" 10714 description: | 10715 Only return this number of log lines from the end of the logs. 10716 Specify as an integer or `all` to output all log lines. 10717 type: "string" 10718 default: "all" 10719 tags: ["Task"] 10720 /secrets: 10721 get: 10722 summary: "List secrets" 10723 operationId: "SecretList" 10724 produces: 10725 - "application/json" 10726 responses: 10727 200: 10728 description: "no error" 10729 schema: 10730 type: "array" 10731 items: 10732 $ref: "#/definitions/Secret" 10733 example: 10734 - ID: "blt1owaxmitz71s9v5zh81zun" 10735 Version: 10736 Index: 85 10737 CreatedAt: "2017-07-20T13:55:28.678958722Z" 10738 UpdatedAt: "2017-07-20T13:55:28.678958722Z" 10739 Spec: 10740 Name: "mysql-passwd" 10741 Labels: 10742 some.label: "some.value" 10743 Driver: 10744 Name: "secret-bucket" 10745 Options: 10746 OptionA: "value for driver option A" 10747 OptionB: "value for driver option B" 10748 - ID: "ktnbjxoalbkvbvedmg1urrz8h" 10749 Version: 10750 Index: 11 10751 CreatedAt: "2016-11-05T01:20:17.327670065Z" 10752 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 10753 Spec: 10754 Name: "app-dev.crt" 10755 Labels: 10756 foo: "bar" 10757 500: 10758 description: "server error" 10759 schema: 10760 $ref: "#/definitions/ErrorResponse" 10761 503: 10762 description: "node is not part of a swarm" 10763 schema: 10764 $ref: "#/definitions/ErrorResponse" 10765 parameters: 10766 - name: "filters" 10767 in: "query" 10768 type: "string" 10769 description: | 10770 A JSON encoded value of the filters (a `map[string][]string`) to 10771 process on the secrets list. 10772 10773 Available filters: 10774 10775 - `id=<secret id>` 10776 - `label=<key> or label=<key>=value` 10777 - `name=<secret name>` 10778 - `names=<secret name>` 10779 tags: ["Secret"] 10780 /secrets/create: 10781 post: 10782 summary: "Create a secret" 10783 operationId: "SecretCreate" 10784 consumes: 10785 - "application/json" 10786 produces: 10787 - "application/json" 10788 responses: 10789 201: 10790 description: "no error" 10791 schema: 10792 $ref: "#/definitions/IdResponse" 10793 409: 10794 description: "name conflicts with an existing object" 10795 schema: 10796 $ref: "#/definitions/ErrorResponse" 10797 500: 10798 description: "server error" 10799 schema: 10800 $ref: "#/definitions/ErrorResponse" 10801 503: 10802 description: "node is not part of a swarm" 10803 schema: 10804 $ref: "#/definitions/ErrorResponse" 10805 parameters: 10806 - name: "body" 10807 in: "body" 10808 schema: 10809 allOf: 10810 - $ref: "#/definitions/SecretSpec" 10811 - type: "object" 10812 example: 10813 Name: "app-key.crt" 10814 Labels: 10815 foo: "bar" 10816 Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" 10817 Driver: 10818 Name: "secret-bucket" 10819 Options: 10820 OptionA: "value for driver option A" 10821 OptionB: "value for driver option B" 10822 tags: ["Secret"] 10823 /secrets/{id}: 10824 get: 10825 summary: "Inspect a secret" 10826 operationId: "SecretInspect" 10827 produces: 10828 - "application/json" 10829 responses: 10830 200: 10831 description: "no error" 10832 schema: 10833 $ref: "#/definitions/Secret" 10834 examples: 10835 application/json: 10836 ID: "ktnbjxoalbkvbvedmg1urrz8h" 10837 Version: 10838 Index: 11 10839 CreatedAt: "2016-11-05T01:20:17.327670065Z" 10840 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 10841 Spec: 10842 Name: "app-dev.crt" 10843 Labels: 10844 foo: "bar" 10845 Driver: 10846 Name: "secret-bucket" 10847 Options: 10848 OptionA: "value for driver option A" 10849 OptionB: "value for driver option B" 10850 10851 404: 10852 description: "secret not found" 10853 schema: 10854 $ref: "#/definitions/ErrorResponse" 10855 500: 10856 description: "server error" 10857 schema: 10858 $ref: "#/definitions/ErrorResponse" 10859 503: 10860 description: "node is not part of a swarm" 10861 schema: 10862 $ref: "#/definitions/ErrorResponse" 10863 parameters: 10864 - name: "id" 10865 in: "path" 10866 required: true 10867 type: "string" 10868 description: "ID of the secret" 10869 tags: ["Secret"] 10870 delete: 10871 summary: "Delete a secret" 10872 operationId: "SecretDelete" 10873 produces: 10874 - "application/json" 10875 responses: 10876 204: 10877 description: "no error" 10878 404: 10879 description: "secret not found" 10880 schema: 10881 $ref: "#/definitions/ErrorResponse" 10882 500: 10883 description: "server error" 10884 schema: 10885 $ref: "#/definitions/ErrorResponse" 10886 503: 10887 description: "node is not part of a swarm" 10888 schema: 10889 $ref: "#/definitions/ErrorResponse" 10890 parameters: 10891 - name: "id" 10892 in: "path" 10893 required: true 10894 type: "string" 10895 description: "ID of the secret" 10896 tags: ["Secret"] 10897 /secrets/{id}/update: 10898 post: 10899 summary: "Update a Secret" 10900 operationId: "SecretUpdate" 10901 responses: 10902 200: 10903 description: "no error" 10904 400: 10905 description: "bad parameter" 10906 schema: 10907 $ref: "#/definitions/ErrorResponse" 10908 404: 10909 description: "no such secret" 10910 schema: 10911 $ref: "#/definitions/ErrorResponse" 10912 500: 10913 description: "server error" 10914 schema: 10915 $ref: "#/definitions/ErrorResponse" 10916 503: 10917 description: "node is not part of a swarm" 10918 schema: 10919 $ref: "#/definitions/ErrorResponse" 10920 parameters: 10921 - name: "id" 10922 in: "path" 10923 description: "The ID or name of the secret" 10924 type: "string" 10925 required: true 10926 - name: "body" 10927 in: "body" 10928 schema: 10929 $ref: "#/definitions/SecretSpec" 10930 description: | 10931 The spec of the secret to update. Currently, only the Labels field 10932 can be updated. All other fields must remain unchanged from the 10933 [SecretInspect endpoint](#operation/SecretInspect) response values. 10934 - name: "version" 10935 in: "query" 10936 description: | 10937 The version number of the secret object being updated. This is 10938 required to avoid conflicting writes. 10939 type: "integer" 10940 format: "int64" 10941 required: true 10942 tags: ["Secret"] 10943 /configs: 10944 get: 10945 summary: "List configs" 10946 operationId: "ConfigList" 10947 produces: 10948 - "application/json" 10949 responses: 10950 200: 10951 description: "no error" 10952 schema: 10953 type: "array" 10954 items: 10955 $ref: "#/definitions/Config" 10956 example: 10957 - ID: "ktnbjxoalbkvbvedmg1urrz8h" 10958 Version: 10959 Index: 11 10960 CreatedAt: "2016-11-05T01:20:17.327670065Z" 10961 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 10962 Spec: 10963 Name: "server.conf" 10964 500: 10965 description: "server error" 10966 schema: 10967 $ref: "#/definitions/ErrorResponse" 10968 503: 10969 description: "node is not part of a swarm" 10970 schema: 10971 $ref: "#/definitions/ErrorResponse" 10972 parameters: 10973 - name: "filters" 10974 in: "query" 10975 type: "string" 10976 description: | 10977 A JSON encoded value of the filters (a `map[string][]string`) to 10978 process on the configs list. 10979 10980 Available filters: 10981 10982 - `id=<config id>` 10983 - `label=<key> or label=<key>=value` 10984 - `name=<config name>` 10985 - `names=<config name>` 10986 tags: ["Config"] 10987 /configs/create: 10988 post: 10989 summary: "Create a config" 10990 operationId: "ConfigCreate" 10991 consumes: 10992 - "application/json" 10993 produces: 10994 - "application/json" 10995 responses: 10996 201: 10997 description: "no error" 10998 schema: 10999 $ref: "#/definitions/IdResponse" 11000 409: 11001 description: "name conflicts with an existing object" 11002 schema: 11003 $ref: "#/definitions/ErrorResponse" 11004 500: 11005 description: "server error" 11006 schema: 11007 $ref: "#/definitions/ErrorResponse" 11008 503: 11009 description: "node is not part of a swarm" 11010 schema: 11011 $ref: "#/definitions/ErrorResponse" 11012 parameters: 11013 - name: "body" 11014 in: "body" 11015 schema: 11016 allOf: 11017 - $ref: "#/definitions/ConfigSpec" 11018 - type: "object" 11019 example: 11020 Name: "server.conf" 11021 Labels: 11022 foo: "bar" 11023 Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" 11024 tags: ["Config"] 11025 /configs/{id}: 11026 get: 11027 summary: "Inspect a config" 11028 operationId: "ConfigInspect" 11029 produces: 11030 - "application/json" 11031 responses: 11032 200: 11033 description: "no error" 11034 schema: 11035 $ref: "#/definitions/Config" 11036 examples: 11037 application/json: 11038 ID: "ktnbjxoalbkvbvedmg1urrz8h" 11039 Version: 11040 Index: 11 11041 CreatedAt: "2016-11-05T01:20:17.327670065Z" 11042 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 11043 Spec: 11044 Name: "app-dev.crt" 11045 404: 11046 description: "config not found" 11047 schema: 11048 $ref: "#/definitions/ErrorResponse" 11049 500: 11050 description: "server error" 11051 schema: 11052 $ref: "#/definitions/ErrorResponse" 11053 503: 11054 description: "node is not part of a swarm" 11055 schema: 11056 $ref: "#/definitions/ErrorResponse" 11057 parameters: 11058 - name: "id" 11059 in: "path" 11060 required: true 11061 type: "string" 11062 description: "ID of the config" 11063 tags: ["Config"] 11064 delete: 11065 summary: "Delete a config" 11066 operationId: "ConfigDelete" 11067 produces: 11068 - "application/json" 11069 responses: 11070 204: 11071 description: "no error" 11072 404: 11073 description: "config not found" 11074 schema: 11075 $ref: "#/definitions/ErrorResponse" 11076 500: 11077 description: "server error" 11078 schema: 11079 $ref: "#/definitions/ErrorResponse" 11080 503: 11081 description: "node is not part of a swarm" 11082 schema: 11083 $ref: "#/definitions/ErrorResponse" 11084 parameters: 11085 - name: "id" 11086 in: "path" 11087 required: true 11088 type: "string" 11089 description: "ID of the config" 11090 tags: ["Config"] 11091 /configs/{id}/update: 11092 post: 11093 summary: "Update a Config" 11094 operationId: "ConfigUpdate" 11095 responses: 11096 200: 11097 description: "no error" 11098 400: 11099 description: "bad parameter" 11100 schema: 11101 $ref: "#/definitions/ErrorResponse" 11102 404: 11103 description: "no such config" 11104 schema: 11105 $ref: "#/definitions/ErrorResponse" 11106 500: 11107 description: "server error" 11108 schema: 11109 $ref: "#/definitions/ErrorResponse" 11110 503: 11111 description: "node is not part of a swarm" 11112 schema: 11113 $ref: "#/definitions/ErrorResponse" 11114 parameters: 11115 - name: "id" 11116 in: "path" 11117 description: "The ID or name of the config" 11118 type: "string" 11119 required: true 11120 - name: "body" 11121 in: "body" 11122 schema: 11123 $ref: "#/definitions/ConfigSpec" 11124 description: | 11125 The spec of the config to update. Currently, only the Labels field 11126 can be updated. All other fields must remain unchanged from the 11127 [ConfigInspect endpoint](#operation/ConfigInspect) response values. 11128 - name: "version" 11129 in: "query" 11130 description: | 11131 The version number of the config object being updated. This is 11132 required to avoid conflicting writes. 11133 type: "integer" 11134 format: "int64" 11135 required: true 11136 tags: ["Config"] 11137 /distribution/{name}/json: 11138 get: 11139 summary: "Get image information from the registry" 11140 description: | 11141 Return image digest and platform information by contacting the registry. 11142 operationId: "DistributionInspect" 11143 produces: 11144 - "application/json" 11145 responses: 11146 200: 11147 description: "descriptor and platform information" 11148 schema: 11149 type: "object" 11150 x-go-name: DistributionInspect 11151 title: "DistributionInspectResponse" 11152 required: [Descriptor, Platforms] 11153 properties: 11154 Descriptor: 11155 type: "object" 11156 description: | 11157 A descriptor struct containing digest, media type, and size. 11158 properties: 11159 MediaType: 11160 type: "string" 11161 Size: 11162 type: "integer" 11163 format: "int64" 11164 Digest: 11165 type: "string" 11166 URLs: 11167 type: "array" 11168 items: 11169 type: "string" 11170 Platforms: 11171 type: "array" 11172 description: | 11173 An array containing all platforms supported by the image. 11174 items: 11175 type: "object" 11176 properties: 11177 Architecture: 11178 type: "string" 11179 OS: 11180 type: "string" 11181 OSVersion: 11182 type: "string" 11183 OSFeatures: 11184 type: "array" 11185 items: 11186 type: "string" 11187 Variant: 11188 type: "string" 11189 Features: 11190 type: "array" 11191 items: 11192 type: "string" 11193 examples: 11194 application/json: 11195 Descriptor: 11196 MediaType: "application/vnd.docker.distribution.manifest.v2+json" 11197 Digest: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96" 11198 Size: 3987495 11199 URLs: 11200 - "" 11201 Platforms: 11202 - Architecture: "amd64" 11203 OS: "linux" 11204 OSVersion: "" 11205 OSFeatures: 11206 - "" 11207 Variant: "" 11208 Features: 11209 - "" 11210 401: 11211 description: "Failed authentication or no image found" 11212 schema: 11213 $ref: "#/definitions/ErrorResponse" 11214 examples: 11215 application/json: 11216 message: "No such image: someimage (tag: latest)" 11217 500: 11218 description: "Server error" 11219 schema: 11220 $ref: "#/definitions/ErrorResponse" 11221 parameters: 11222 - name: "name" 11223 in: "path" 11224 description: "Image name or id" 11225 type: "string" 11226 required: true 11227 tags: ["Distribution"] 11228 /session: 11229 post: 11230 summary: "Initialize interactive session" 11231 description: | 11232 Start a new interactive session with a server. Session allows server to 11233 call back to the client for advanced capabilities. 11234 11235 ### Hijacking 11236 11237 This endpoint hijacks the HTTP connection to HTTP2 transport that allows 11238 the client to expose gPRC services on that connection. 11239 11240 For example, the client sends this request to upgrade the connection: 11241 11242 ``` 11243 POST /session HTTP/1.1 11244 Upgrade: h2c 11245 Connection: Upgrade 11246 ``` 11247 11248 The Docker daemon responds with a `101 UPGRADED` response follow with 11249 the raw stream: 11250 11251 ``` 11252 HTTP/1.1 101 UPGRADED 11253 Connection: Upgrade 11254 Upgrade: h2c 11255 ``` 11256 operationId: "Session" 11257 produces: 11258 - "application/vnd.docker.raw-stream" 11259 responses: 11260 101: 11261 description: "no error, hijacking successful" 11262 400: 11263 description: "bad parameter" 11264 schema: 11265 $ref: "#/definitions/ErrorResponse" 11266 500: 11267 description: "server error" 11268 schema: 11269 $ref: "#/definitions/ErrorResponse" 11270 tags: ["Session"]