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