github.com/jiasir/docker@v1.3.3-0.20170609024000-252e610103e7/api/swagger.yaml (about) 1 # A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. 2 # 3 # This is used for generating API documentation and the types used by the 4 # client/server. See api/README.md for more information. 5 # 6 # Some style notes: 7 # - This file is used by ReDoc, which allows GitHub Flavored Markdown in 8 # descriptions. 9 # - There is no maximum line length, for ease of editing and pretty diffs. 10 # - operationIds are in the format "NounVerb", with a singular noun. 11 12 swagger: "2.0" 13 schemes: 14 - "http" 15 - "https" 16 produces: 17 - "application/json" 18 - "text/plain" 19 consumes: 20 - "application/json" 21 - "text/plain" 22 basePath: "/v1.30" 23 info: 24 title: "Docker Engine API" 25 version: "1.30" 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 of Docker, so API calls are versioned to ensure that clients don't break. 46 47 For Docker Engine 17.06, the API version is 1.30. To lock to this version, you prefix the URL with `/v1.30`. For example, calling `/info` is the same as calling `/v1.30/info`. 48 49 Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. 50 51 In previous versions of Docker, it was possible to access the API without providing a version. This behaviour is now deprecated will be removed in a future version of Docker. 52 53 The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons. 54 55 This documentation is for version 1.30 of the API, which was introduced with Docker 17.06. Use this table to find documentation for previous versions of the API: 56 57 Docker version | API version | Changes 58 ----------------|-------------|--------- 59 17.05.x | [1.29](https://docs.docker.com/engine/api/v1.29/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-29-api-changes) 60 17.04.x | [1.28](https://docs.docker.com/engine/api/v1.28/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-28-api-changes) 61 17.03.1 | [1.27](https://docs.docker.com/engine/api/v1.27/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-27-api-changes) 62 1.13.1 & 17.03.0 | [1.26](https://docs.docker.com/engine/api/v1.26/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-26-api-changes) 63 1.13.0 | [1.25](https://docs.docker.com/engine/api/v1.25/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-25-api-changes) 64 1.12.x | [1.24](https://docs.docker.com/engine/api/v1.24/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-24-api-changes) 65 1.11.x | [1.23](https://docs.docker.com/engine/api/v1.23/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-23-api-changes) 66 1.10.x | [1.22](https://docs.docker.com/engine/api/v1.22/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-22-api-changes) 67 1.9.x | [1.21](https://docs.docker.com/engine/api/v1.21/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-21-api-changes) 68 1.8.x | [1.20](https://docs.docker.com/engine/api/v1.20/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-20-api-changes) 69 1.7.x | [1.19](https://docs.docker.com/engine/api/v1.19/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-19-api-changes) 70 1.6.x | [1.18](https://docs.docker.com/engine/api/v1.18/) | [API changes](https://docs.docker.com/engine/api/version-history/#v1-18-api-changes) 71 72 # Authentication 73 74 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: 75 76 ``` 77 { 78 "username": "string", 79 "password": "string", 80 "email": "string", 81 "serveraddress": "string" 82 } 83 ``` 84 85 The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. 86 87 If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: 88 89 ``` 90 { 91 "identitytoken": "9cbaf023786cd7..." 92 } 93 ``` 94 95 # The tags on paths define the menu sections in the ReDoc documentation, so 96 # the usage of tags must make sense for that: 97 # - They should be singular, not plural. 98 # - There should not be too many tags, or the menu becomes unwieldy. For 99 # example, it is preferable to add a path to the "System" tag instead of 100 # creating a tag with a single path in it. 101 # - The order of tags in this list defines the order in the menu. 102 tags: 103 # Primary objects 104 - name: "Container" 105 x-displayName: "Containers" 106 description: | 107 Create and manage containers. 108 - name: "Image" 109 x-displayName: "Images" 110 - name: "Network" 111 x-displayName: "Networks" 112 description: | 113 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. 114 - name: "Volume" 115 x-displayName: "Volumes" 116 description: | 117 Create and manage persistent storage that can be attached to containers. 118 - name: "Exec" 119 x-displayName: "Exec" 120 description: | 121 Run new commands inside running containers. See the [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) for more information. 122 123 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`. 124 # Swarm things 125 - name: "Swarm" 126 x-displayName: "Swarm" 127 description: | 128 Engines can be clustered together in a swarm. See [the swarm mode documentation](https://docs.docker.com/engine/swarm/) for more information. 129 - name: "Node" 130 x-displayName: "Nodes" 131 description: | 132 Nodes are instances of the Engine participating in a swarm. Swarm mode must be enabled for these endpoints to work. 133 - name: "Service" 134 x-displayName: "Services" 135 description: | 136 Services are the definitions of tasks to run on a swarm. Swarm mode must be enabled for these endpoints to work. 137 - name: "Task" 138 x-displayName: "Tasks" 139 description: | 140 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. 141 - name: "Secret" 142 x-displayName: "Secrets" 143 description: | 144 Secrets are sensitive data that can be used by services. Swarm mode must be enabled for these endpoints to work. 145 # System things 146 - name: "Plugin" 147 x-displayName: "Plugins" 148 - name: "System" 149 x-displayName: "System" 150 151 definitions: 152 Port: 153 type: "object" 154 description: "An open port on a container" 155 required: [PrivatePort, Type] 156 properties: 157 IP: 158 type: "string" 159 format: "ip-address" 160 PrivatePort: 161 type: "integer" 162 format: "uint16" 163 x-nullable: false 164 description: "Port on the container" 165 PublicPort: 166 type: "integer" 167 format: "uint16" 168 description: "Port exposed on the host" 169 Type: 170 type: "string" 171 x-nullable: false 172 enum: ["tcp", "udp"] 173 example: 174 PrivatePort: 8080 175 PublicPort: 80 176 Type: "tcp" 177 178 MountPoint: 179 type: "object" 180 description: "A mount point inside a container" 181 properties: 182 Type: 183 type: "string" 184 Name: 185 type: "string" 186 Source: 187 type: "string" 188 Destination: 189 type: "string" 190 Driver: 191 type: "string" 192 Mode: 193 type: "string" 194 RW: 195 type: "boolean" 196 Propagation: 197 type: "string" 198 199 DeviceMapping: 200 type: "object" 201 description: "A device mapping between the host and container" 202 properties: 203 PathOnHost: 204 type: "string" 205 PathInContainer: 206 type: "string" 207 CgroupPermissions: 208 type: "string" 209 example: 210 PathOnHost: "/dev/deviceName" 211 PathInContainer: "/dev/deviceName" 212 CgroupPermissions: "mrw" 213 214 ThrottleDevice: 215 type: "object" 216 properties: 217 Path: 218 description: "Device path" 219 type: "string" 220 Rate: 221 description: "Rate" 222 type: "integer" 223 format: "int64" 224 minimum: 0 225 226 Mount: 227 type: "object" 228 properties: 229 Target: 230 description: "Container path." 231 type: "string" 232 Source: 233 description: "Mount source (e.g. a volume name, a host path)." 234 type: "string" 235 Type: 236 description: | 237 The mount type. Available types: 238 239 - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. 240 - `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. 241 - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. 242 type: "string" 243 enum: 244 - "bind" 245 - "volume" 246 - "tmpfs" 247 ReadOnly: 248 description: "Whether the mount should be read-only." 249 type: "boolean" 250 Consistency: 251 description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`." 252 type: "string" 253 BindOptions: 254 description: "Optional configuration for the `bind` type." 255 type: "object" 256 properties: 257 Propagation: 258 description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." 259 enum: 260 - "private" 261 - "rprivate" 262 - "shared" 263 - "rshared" 264 - "slave" 265 - "rslave" 266 VolumeOptions: 267 description: "Optional configuration for the `volume` type." 268 type: "object" 269 properties: 270 NoCopy: 271 description: "Populate volume with data from the target." 272 type: "boolean" 273 default: false 274 Labels: 275 description: "User-defined key/value metadata." 276 type: "object" 277 additionalProperties: 278 type: "string" 279 DriverConfig: 280 description: "Map of driver specific options" 281 type: "object" 282 properties: 283 Name: 284 description: "Name of the driver to use to create the volume." 285 type: "string" 286 Options: 287 description: "key/value map of driver specific options." 288 type: "object" 289 additionalProperties: 290 type: "string" 291 TmpfsOptions: 292 description: "Optional configuration for the `tmpfs` type." 293 type: "object" 294 properties: 295 SizeBytes: 296 description: "The size for the tmpfs mount in bytes." 297 type: "integer" 298 format: "int64" 299 Mode: 300 description: "The permission mode for the tmpfs mount in an integer." 301 type: "integer" 302 RestartPolicy: 303 description: | 304 The behavior to apply when the container exits. The default is not to restart. 305 306 An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. 307 type: "object" 308 properties: 309 Name: 310 type: "string" 311 description: | 312 - Empty string means not to restart 313 - `always` Always restart 314 - `unless-stopped` Restart always except when the user has manually stopped the container 315 - `on-failure` Restart only when the container exit code is non-zero 316 enum: 317 - "" 318 - "always" 319 - "unless-stopped" 320 - "on-failure" 321 MaximumRetryCount: 322 type: "integer" 323 description: "If `on-failure` is used, the number of times to retry before giving up" 324 default: {} 325 326 Resources: 327 description: "A container's resources (cgroups config, ulimits, etc)" 328 type: "object" 329 properties: 330 # Applicable to all platforms 331 CpuShares: 332 description: "An integer value representing this container's relative CPU weight versus other containers." 333 type: "integer" 334 Memory: 335 description: "Memory limit in bytes." 336 type: "integer" 337 default: 0 338 # Applicable to UNIX platforms 339 CgroupParent: 340 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." 341 type: "string" 342 BlkioWeight: 343 description: "Block IO weight (relative weight)." 344 type: "integer" 345 minimum: 0 346 maximum: 1000 347 BlkioWeightDevice: 348 description: | 349 Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. 350 type: "array" 351 items: 352 type: "object" 353 properties: 354 Path: 355 type: "string" 356 Weight: 357 type: "integer" 358 minimum: 0 359 BlkioDeviceReadBps: 360 description: | 361 Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. 362 type: "array" 363 items: 364 $ref: "#/definitions/ThrottleDevice" 365 BlkioDeviceWriteBps: 366 description: | 367 Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. 368 type: "array" 369 items: 370 $ref: "#/definitions/ThrottleDevice" 371 BlkioDeviceReadIOps: 372 description: | 373 Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. 374 type: "array" 375 items: 376 $ref: "#/definitions/ThrottleDevice" 377 BlkioDeviceWriteIOps: 378 description: | 379 Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. 380 type: "array" 381 items: 382 $ref: "#/definitions/ThrottleDevice" 383 CpuPeriod: 384 description: "The length of a CPU period in microseconds." 385 type: "integer" 386 format: "int64" 387 CpuQuota: 388 description: "Microseconds of CPU time that the container can get in a CPU period." 389 type: "integer" 390 format: "int64" 391 CpuRealtimePeriod: 392 description: "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks." 393 type: "integer" 394 format: "int64" 395 CpuRealtimeRuntime: 396 description: "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks." 397 type: "integer" 398 format: "int64" 399 CpusetCpus: 400 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)" 401 type: "string" 402 CpusetMems: 403 description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems." 404 type: "string" 405 Devices: 406 description: "A list of devices to add to the container." 407 type: "array" 408 items: 409 $ref: "#/definitions/DeviceMapping" 410 DeviceCgroupRules: 411 description: "a list of cgroup rules to apply to the container" 412 type: "array" 413 items: 414 type: "string" 415 example: "c 13:* rwm" 416 DiskQuota: 417 description: "Disk limit (in bytes)." 418 type: "integer" 419 format: "int64" 420 KernelMemory: 421 description: "Kernel memory limit in bytes." 422 type: "integer" 423 format: "int64" 424 MemoryReservation: 425 description: "Memory soft limit in bytes." 426 type: "integer" 427 format: "int64" 428 MemorySwap: 429 description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap." 430 type: "integer" 431 format: "int64" 432 MemorySwappiness: 433 description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100." 434 type: "integer" 435 format: "int64" 436 minimum: 0 437 maximum: 100 438 NanoCPUs: 439 description: "CPU quota in units of 10<sup>-9</sup> CPUs." 440 type: "integer" 441 format: "int64" 442 OomKillDisable: 443 description: "Disable OOM Killer for the container." 444 type: "boolean" 445 PidsLimit: 446 description: "Tune a container's pids limit. Set -1 for unlimited." 447 type: "integer" 448 format: "int64" 449 Ulimits: 450 description: | 451 A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" 452 type: "array" 453 items: 454 type: "object" 455 properties: 456 Name: 457 description: "Name of ulimit" 458 type: "string" 459 Soft: 460 description: "Soft limit" 461 type: "integer" 462 Hard: 463 description: "Hard limit" 464 type: "integer" 465 # Applicable to Windows 466 CpuCount: 467 description: | 468 The number of usable CPUs (Windows only). 469 470 On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. 471 type: "integer" 472 format: "int64" 473 CpuPercent: 474 description: | 475 The usable percentage of the available CPUs (Windows only). 476 477 On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. 478 type: "integer" 479 format: "int64" 480 IOMaximumIOps: 481 description: "Maximum IOps for the container system drive (Windows only)" 482 type: "integer" 483 format: "int64" 484 IOMaximumBandwidth: 485 description: "Maximum IO in bytes per second for the container system drive (Windows only)" 486 type: "integer" 487 format: "int64" 488 489 HealthConfig: 490 description: "A test to perform to check that the container is healthy." 491 type: "object" 492 properties: 493 Test: 494 description: | 495 The test to perform. Possible values are: 496 497 - `[]` inherit healthcheck from image or parent image 498 - `["NONE"]` disable healthcheck 499 - `["CMD", args...]` exec arguments directly 500 - `["CMD-SHELL", command]` run command with system's default shell 501 type: "array" 502 items: 503 type: "string" 504 Interval: 505 description: "The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit." 506 type: "integer" 507 Timeout: 508 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." 509 type: "integer" 510 Retries: 511 description: "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit." 512 type: "integer" 513 StartPeriod: 514 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." 515 type: "integer" 516 517 HostConfig: 518 description: "Container configuration that depends on the host we are running on" 519 allOf: 520 - $ref: "#/definitions/Resources" 521 - type: "object" 522 properties: 523 # Applicable to all platforms 524 Binds: 525 type: "array" 526 description: | 527 A list of volume bindings for this container. Each volume binding is a string in one of these forms: 528 529 - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. 530 - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. 531 - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. 532 - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. 533 items: 534 type: "string" 535 ContainerIDFile: 536 type: "string" 537 description: "Path to a file where the container ID is written" 538 LogConfig: 539 type: "object" 540 description: "The logging configuration for this container" 541 properties: 542 Type: 543 type: "string" 544 enum: 545 - "json-file" 546 - "syslog" 547 - "journald" 548 - "gelf" 549 - "fluentd" 550 - "awslogs" 551 - "splunk" 552 - "etwlogs" 553 - "none" 554 Config: 555 type: "object" 556 additionalProperties: 557 type: "string" 558 NetworkMode: 559 type: "string" 560 description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken 561 as a custom network's name to which this container should connect to." 562 PortBindings: 563 type: "object" 564 description: "A map of exposed container ports and the host port they should map to." 565 additionalProperties: 566 type: "object" 567 properties: 568 HostIp: 569 type: "string" 570 description: "The host IP address" 571 HostPort: 572 type: "string" 573 description: "The host port number, as a string" 574 RestartPolicy: 575 $ref: "#/definitions/RestartPolicy" 576 AutoRemove: 577 type: "boolean" 578 description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set." 579 VolumeDriver: 580 type: "string" 581 description: "Driver that this container uses to mount volumes." 582 VolumesFrom: 583 type: "array" 584 description: "A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`." 585 items: 586 type: "string" 587 Mounts: 588 description: "Specification for mounts to be added to the container." 589 type: "array" 590 items: 591 $ref: "#/definitions/Mount" 592 593 # Applicable to UNIX platforms 594 CapAdd: 595 type: "array" 596 description: "A list of kernel capabilities to add to the container." 597 items: 598 type: "string" 599 CapDrop: 600 type: "array" 601 description: "A list of kernel capabilities to drop from the container." 602 items: 603 type: "string" 604 Dns: 605 type: "array" 606 description: "A list of DNS servers for the container to use." 607 items: 608 type: "string" 609 DnsOptions: 610 type: "array" 611 description: "A list of DNS options." 612 items: 613 type: "string" 614 DnsSearch: 615 type: "array" 616 description: "A list of DNS search domains." 617 items: 618 type: "string" 619 ExtraHosts: 620 type: "array" 621 description: | 622 A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. 623 items: 624 type: "string" 625 GroupAdd: 626 type: "array" 627 description: "A list of additional groups that the container process will run as." 628 items: 629 type: "string" 630 IpcMode: 631 type: "string" 632 description: "IPC namespace to use for the container." 633 Cgroup: 634 type: "string" 635 description: "Cgroup to use for the container." 636 Links: 637 type: "array" 638 description: "A list of links for the container in the form `container_name:alias`." 639 items: 640 type: "string" 641 OomScoreAdj: 642 type: "integer" 643 description: "An integer value containing the score given to the container in order to tune OOM killer preferences." 644 PidMode: 645 type: "string" 646 description: | 647 Set the PID (Process) Namespace mode for the container. It can be either: 648 649 - `"container:<name|id>"`: joins another container's PID namespace 650 - `"host"`: use the host's PID namespace inside the container 651 Privileged: 652 type: "boolean" 653 description: "Gives the container full access to the host." 654 PublishAllPorts: 655 type: "boolean" 656 description: "Allocates a random host port for all of a container's exposed ports." 657 ReadonlyRootfs: 658 type: "boolean" 659 description: "Mount the container's root filesystem as read only." 660 SecurityOpt: 661 type: "array" 662 description: "A list of string values to customize labels for MLS 663 systems, such as SELinux." 664 items: 665 type: "string" 666 StorageOpt: 667 type: "object" 668 description: | 669 Storage driver options for this container, in the form `{"size": "120G"}`. 670 additionalProperties: 671 type: "string" 672 Tmpfs: 673 type: "object" 674 description: | 675 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" }`. 676 additionalProperties: 677 type: "string" 678 UTSMode: 679 type: "string" 680 description: "UTS namespace to use for the container." 681 UsernsMode: 682 type: "string" 683 description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled." 684 ShmSize: 685 type: "integer" 686 description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB." 687 minimum: 0 688 Sysctls: 689 type: "object" 690 description: | 691 A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` 692 additionalProperties: 693 type: "string" 694 Runtime: 695 type: "string" 696 description: "Runtime to use with this container." 697 # Applicable to Windows 698 ConsoleSize: 699 type: "array" 700 description: "Initial console size, as an `[height, width]` array. (Windows only)" 701 minItems: 2 702 maxItems: 2 703 items: 704 type: "integer" 705 minimum: 0 706 Isolation: 707 type: "string" 708 description: "Isolation technology of the container. (Windows only)" 709 enum: 710 - "default" 711 - "process" 712 - "hyperv" 713 714 Config: 715 description: "Configuration for a container that is portable between hosts" 716 type: "object" 717 properties: 718 Hostname: 719 description: "The hostname to use for the container, as a valid RFC 1123 hostname." 720 type: "string" 721 Domainname: 722 description: "The domain name to use for the container." 723 type: "string" 724 User: 725 description: "The user that commands are run as inside the container." 726 type: "string" 727 AttachStdin: 728 description: "Whether to attach to `stdin`." 729 type: "boolean" 730 default: false 731 AttachStdout: 732 description: "Whether to attach to `stdout`." 733 type: "boolean" 734 default: true 735 AttachStderr: 736 description: "Whether to attach to `stderr`." 737 type: "boolean" 738 default: true 739 ExposedPorts: 740 description: | 741 An object mapping ports to an empty object in the form: 742 743 `{"<port>/<tcp|udp>": {}}` 744 type: "object" 745 additionalProperties: 746 type: "object" 747 enum: 748 - {} 749 default: {} 750 Tty: 751 description: "Attach standard streams to a TTY, including `stdin` if it is not closed." 752 type: "boolean" 753 default: false 754 OpenStdin: 755 description: "Open `stdin`" 756 type: "boolean" 757 default: false 758 StdinOnce: 759 description: "Close `stdin` after one attached client disconnects" 760 type: "boolean" 761 default: false 762 Env: 763 description: | 764 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. 765 type: "array" 766 items: 767 type: "string" 768 Cmd: 769 description: "Command to run specified as a string or an array of strings." 770 type: 771 - "array" 772 - "string" 773 items: 774 type: "string" 775 Healthcheck: 776 $ref: "#/definitions/HealthConfig" 777 ArgsEscaped: 778 description: "Command is already escaped (Windows only)" 779 type: "boolean" 780 Image: 781 description: "The name of the image to use when creating the container" 782 type: "string" 783 Volumes: 784 description: "An object mapping mount point paths inside the container to empty objects." 785 type: "object" 786 properties: 787 additionalProperties: 788 type: "object" 789 enum: 790 - {} 791 default: {} 792 WorkingDir: 793 description: "The working directory for commands to run in." 794 type: "string" 795 Entrypoint: 796 description: | 797 The entry point for the container as a string or an array of strings. 798 799 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`). 800 type: 801 - "array" 802 - "string" 803 items: 804 type: "string" 805 NetworkDisabled: 806 description: "Disable networking for the container." 807 type: "boolean" 808 MacAddress: 809 description: "MAC address of the container." 810 type: "string" 811 OnBuild: 812 description: "`ONBUILD` metadata that were defined in the image's `Dockerfile`." 813 type: "array" 814 items: 815 type: "string" 816 Labels: 817 description: "User-defined key/value metadata." 818 type: "object" 819 additionalProperties: 820 type: "string" 821 StopSignal: 822 description: "Signal to stop a container as a string or unsigned integer." 823 type: "string" 824 default: "SIGTERM" 825 StopTimeout: 826 description: "Timeout to stop a container in seconds." 827 type: "integer" 828 default: 10 829 Shell: 830 description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell." 831 type: "array" 832 items: 833 type: "string" 834 835 NetworkConfig: 836 description: "TODO: check is correct" 837 type: "object" 838 properties: 839 Bridge: 840 type: "string" 841 Gateway: 842 type: "string" 843 Address: 844 type: "string" 845 IPPrefixLen: 846 type: "integer" 847 MacAddress: 848 type: "string" 849 PortMapping: 850 type: "string" 851 Ports: 852 type: "array" 853 items: 854 $ref: "#/definitions/Port" 855 856 GraphDriverData: 857 description: "Information about a container's graph driver." 858 type: "object" 859 required: [Name, Data] 860 properties: 861 Name: 862 type: "string" 863 x-nullable: false 864 Data: 865 type: "object" 866 x-nullable: false 867 additionalProperties: 868 type: "string" 869 870 Image: 871 type: "object" 872 required: 873 - Id 874 - Parent 875 - Comment 876 - Created 877 - Container 878 - DockerVersion 879 - Author 880 - Architecture 881 - Os 882 - Size 883 - VirtualSize 884 - GraphDriver 885 - RootFS 886 properties: 887 Id: 888 type: "string" 889 x-nullable: false 890 RepoTags: 891 type: "array" 892 items: 893 type: "string" 894 RepoDigests: 895 type: "array" 896 items: 897 type: "string" 898 Parent: 899 type: "string" 900 x-nullable: false 901 Comment: 902 type: "string" 903 x-nullable: false 904 Created: 905 type: "string" 906 x-nullable: false 907 Container: 908 type: "string" 909 x-nullable: false 910 ContainerConfig: 911 $ref: "#/definitions/Config" 912 DockerVersion: 913 type: "string" 914 x-nullable: false 915 Author: 916 type: "string" 917 x-nullable: false 918 Config: 919 $ref: "#/definitions/Config" 920 Architecture: 921 type: "string" 922 x-nullable: false 923 Os: 924 type: "string" 925 x-nullable: false 926 OsVersion: 927 type: "string" 928 Size: 929 type: "integer" 930 format: "int64" 931 x-nullable: false 932 VirtualSize: 933 type: "integer" 934 format: "int64" 935 x-nullable: false 936 GraphDriver: 937 $ref: "#/definitions/GraphDriverData" 938 RootFS: 939 type: "object" 940 required: [Type] 941 properties: 942 Type: 943 type: "string" 944 x-nullable: false 945 Layers: 946 type: "array" 947 items: 948 type: "string" 949 BaseLayer: 950 type: "string" 951 952 ImageSummary: 953 type: "object" 954 required: 955 - Id 956 - ParentId 957 - RepoTags 958 - RepoDigests 959 - Created 960 - Size 961 - SharedSize 962 - VirtualSize 963 - Labels 964 - Containers 965 properties: 966 Id: 967 type: "string" 968 x-nullable: false 969 ParentId: 970 type: "string" 971 x-nullable: false 972 RepoTags: 973 type: "array" 974 x-nullable: false 975 items: 976 type: "string" 977 RepoDigests: 978 type: "array" 979 x-nullable: false 980 items: 981 type: "string" 982 Created: 983 type: "integer" 984 x-nullable: false 985 Size: 986 type: "integer" 987 x-nullable: false 988 SharedSize: 989 type: "integer" 990 x-nullable: false 991 VirtualSize: 992 type: "integer" 993 x-nullable: false 994 Labels: 995 type: "object" 996 x-nullable: false 997 additionalProperties: 998 type: "string" 999 Containers: 1000 x-nullable: false 1001 type: "integer" 1002 1003 AuthConfig: 1004 type: "object" 1005 properties: 1006 username: 1007 type: "string" 1008 password: 1009 type: "string" 1010 email: 1011 type: "string" 1012 serveraddress: 1013 type: "string" 1014 example: 1015 username: "hannibal" 1016 password: "xxxx" 1017 serveraddress: "https://index.docker.io/v1/" 1018 1019 ProcessConfig: 1020 type: "object" 1021 properties: 1022 privileged: 1023 type: "boolean" 1024 user: 1025 type: "string" 1026 tty: 1027 type: "boolean" 1028 entrypoint: 1029 type: "string" 1030 arguments: 1031 type: "array" 1032 items: 1033 type: "string" 1034 1035 Volume: 1036 type: "object" 1037 required: [Name, Driver, Mountpoint, Labels, Scope, Options] 1038 properties: 1039 Name: 1040 type: "string" 1041 description: "Name of the volume." 1042 x-nullable: false 1043 Driver: 1044 type: "string" 1045 description: "Name of the volume driver used by the volume." 1046 x-nullable: false 1047 Mountpoint: 1048 type: "string" 1049 description: "Mount path of the volume on the host." 1050 x-nullable: false 1051 CreatedAt: 1052 type: "string" 1053 format: "dateTime" 1054 description: "Time volume was created." 1055 Status: 1056 type: "object" 1057 description: | 1058 Low-level details about the volume, provided by the volume driver. 1059 Details are returned as a map with key/value pairs: 1060 `{"key":"value","key2":"value2"}`. 1061 1062 The `Status` field is optional, and is omitted if the volume driver 1063 does not support this feature. 1064 additionalProperties: 1065 type: "object" 1066 Labels: 1067 type: "object" 1068 description: "User-defined key/value metadata." 1069 x-nullable: false 1070 additionalProperties: 1071 type: "string" 1072 Scope: 1073 type: "string" 1074 description: "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level." 1075 default: "local" 1076 x-nullable: false 1077 enum: ["local", "global"] 1078 Options: 1079 type: "object" 1080 description: "The driver specific options used when creating the volume." 1081 additionalProperties: 1082 type: "string" 1083 UsageData: 1084 type: "object" 1085 required: [Size, RefCount] 1086 properties: 1087 Size: 1088 type: "integer" 1089 description: "The disk space used by the volume (local driver only)" 1090 default: -1 1091 x-nullable: false 1092 RefCount: 1093 type: "integer" 1094 default: -1 1095 description: "The number of containers referencing this volume." 1096 x-nullable: false 1097 1098 example: 1099 Name: "tardis" 1100 Driver: "custom" 1101 Mountpoint: "/var/lib/docker/volumes/tardis" 1102 Status: 1103 hello: "world" 1104 Labels: 1105 com.example.some-label: "some-value" 1106 com.example.some-other-label: "some-other-value" 1107 Scope: "local" 1108 CreatedAt: "2016-06-07T20:31:11.853781916Z" 1109 1110 Network: 1111 type: "object" 1112 properties: 1113 Name: 1114 type: "string" 1115 Id: 1116 type: "string" 1117 Created: 1118 type: "string" 1119 format: "dateTime" 1120 Scope: 1121 type: "string" 1122 Driver: 1123 type: "string" 1124 EnableIPv6: 1125 type: "boolean" 1126 IPAM: 1127 $ref: "#/definitions/IPAM" 1128 Internal: 1129 type: "boolean" 1130 Attachable: 1131 type: "boolean" 1132 Ingress: 1133 type: "boolean" 1134 Containers: 1135 type: "object" 1136 additionalProperties: 1137 $ref: "#/definitions/NetworkContainer" 1138 Options: 1139 type: "object" 1140 additionalProperties: 1141 type: "string" 1142 Labels: 1143 type: "object" 1144 additionalProperties: 1145 type: "string" 1146 example: 1147 Name: "net01" 1148 Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" 1149 Created: "2016-10-19T04:33:30.360899459Z" 1150 Scope: "local" 1151 Driver: "bridge" 1152 EnableIPv6: false 1153 IPAM: 1154 Driver: "default" 1155 Config: 1156 - Subnet: "172.19.0.0/16" 1157 Gateway: "172.19.0.1" 1158 Options: 1159 foo: "bar" 1160 Internal: false 1161 Attachable: false 1162 Ingress: false 1163 Containers: 1164 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: 1165 Name: "test" 1166 EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" 1167 MacAddress: "02:42:ac:13:00:02" 1168 IPv4Address: "172.19.0.2/16" 1169 IPv6Address: "" 1170 Options: 1171 com.docker.network.bridge.default_bridge: "true" 1172 com.docker.network.bridge.enable_icc: "true" 1173 com.docker.network.bridge.enable_ip_masquerade: "true" 1174 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 1175 com.docker.network.bridge.name: "docker0" 1176 com.docker.network.driver.mtu: "1500" 1177 Labels: 1178 com.example.some-label: "some-value" 1179 com.example.some-other-label: "some-other-value" 1180 IPAM: 1181 type: "object" 1182 properties: 1183 Driver: 1184 description: "Name of the IPAM driver to use." 1185 type: "string" 1186 default: "default" 1187 Config: 1188 description: "List of IPAM configuration options, specified as a map: `{\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>}`" 1189 type: "array" 1190 items: 1191 type: "object" 1192 additionalProperties: 1193 type: "string" 1194 Options: 1195 description: "Driver-specific options, specified as a map." 1196 type: "array" 1197 items: 1198 type: "object" 1199 additionalProperties: 1200 type: "string" 1201 NetworkContainer: 1202 type: "object" 1203 properties: 1204 Name: 1205 type: "string" 1206 EndpointID: 1207 type: "string" 1208 MacAddress: 1209 type: "string" 1210 IPv4Address: 1211 type: "string" 1212 IPv6Address: 1213 type: "string" 1214 1215 BuildInfo: 1216 type: "object" 1217 properties: 1218 id: 1219 type: "string" 1220 stream: 1221 type: "string" 1222 error: 1223 type: "string" 1224 errorDetail: 1225 $ref: "#/definitions/ErrorDetail" 1226 status: 1227 type: "string" 1228 progress: 1229 type: "string" 1230 progressDetail: 1231 $ref: "#/definitions/ProgressDetail" 1232 1233 CreateImageInfo: 1234 type: "object" 1235 properties: 1236 error: 1237 type: "string" 1238 status: 1239 type: "string" 1240 progress: 1241 type: "string" 1242 progressDetail: 1243 $ref: "#/definitions/ProgressDetail" 1244 1245 PushImageInfo: 1246 type: "object" 1247 properties: 1248 error: 1249 type: "string" 1250 status: 1251 type: "string" 1252 progress: 1253 type: "string" 1254 progressDetail: 1255 $ref: "#/definitions/ProgressDetail" 1256 ErrorDetail: 1257 type: "object" 1258 properties: 1259 code: 1260 type: "integer" 1261 message: 1262 type: "string" 1263 ProgressDetail: 1264 type: "object" 1265 properties: 1266 code: 1267 type: "integer" 1268 message: 1269 type: "integer" 1270 1271 ErrorResponse: 1272 description: "Represents an error." 1273 type: "object" 1274 required: ["message"] 1275 properties: 1276 message: 1277 description: "The error message." 1278 type: "string" 1279 x-nullable: false 1280 example: 1281 message: "Something went wrong." 1282 1283 IdResponse: 1284 description: "Response to an API call that returns just an Id" 1285 type: "object" 1286 required: ["Id"] 1287 properties: 1288 Id: 1289 description: "The id of the newly created object." 1290 type: "string" 1291 x-nullable: false 1292 1293 EndpointSettings: 1294 description: "Configuration for a network endpoint." 1295 type: "object" 1296 properties: 1297 IPAMConfig: 1298 description: "IPAM configurations for the endpoint" 1299 type: "object" 1300 properties: 1301 IPv4Address: 1302 type: "string" 1303 IPv6Address: 1304 type: "string" 1305 LinkLocalIPs: 1306 type: "array" 1307 items: 1308 type: "string" 1309 Links: 1310 type: "array" 1311 items: 1312 type: "string" 1313 Aliases: 1314 type: "array" 1315 items: 1316 type: "string" 1317 NetworkID: 1318 type: "string" 1319 EndpointID: 1320 type: "string" 1321 Gateway: 1322 type: "string" 1323 IPAddress: 1324 type: "string" 1325 IPPrefixLen: 1326 type: "integer" 1327 IPv6Gateway: 1328 type: "string" 1329 GlobalIPv6Address: 1330 type: "string" 1331 GlobalIPv6PrefixLen: 1332 type: "integer" 1333 format: "int64" 1334 MacAddress: 1335 type: "string" 1336 1337 PluginMount: 1338 type: "object" 1339 x-nullable: false 1340 required: [Name, Description, Settable, Source, Destination, Type, Options] 1341 properties: 1342 Name: 1343 type: "string" 1344 x-nullable: false 1345 Description: 1346 type: "string" 1347 x-nullable: false 1348 Settable: 1349 type: "array" 1350 items: 1351 type: "string" 1352 Source: 1353 type: "string" 1354 Destination: 1355 type: "string" 1356 x-nullable: false 1357 Type: 1358 type: "string" 1359 x-nullable: false 1360 Options: 1361 type: "array" 1362 items: 1363 type: "string" 1364 1365 PluginDevice: 1366 type: "object" 1367 required: [Name, Description, Settable, Path] 1368 x-nullable: false 1369 properties: 1370 Name: 1371 type: "string" 1372 x-nullable: false 1373 Description: 1374 type: "string" 1375 x-nullable: false 1376 Settable: 1377 type: "array" 1378 items: 1379 type: "string" 1380 Path: 1381 type: "string" 1382 1383 PluginEnv: 1384 type: "object" 1385 x-nullable: false 1386 required: [Name, Description, Settable, Value] 1387 properties: 1388 Name: 1389 x-nullable: false 1390 type: "string" 1391 Description: 1392 x-nullable: false 1393 type: "string" 1394 Settable: 1395 type: "array" 1396 items: 1397 type: "string" 1398 Value: 1399 type: "string" 1400 1401 PluginInterfaceType: 1402 type: "object" 1403 x-nullable: false 1404 required: [Prefix, Capability, Version] 1405 properties: 1406 Prefix: 1407 type: "string" 1408 x-nullable: false 1409 Capability: 1410 type: "string" 1411 x-nullable: false 1412 Version: 1413 type: "string" 1414 x-nullable: false 1415 1416 Plugin: 1417 description: "A plugin for the Engine API" 1418 type: "object" 1419 required: [Settings, Enabled, Config, Name] 1420 properties: 1421 Id: 1422 type: "string" 1423 Name: 1424 type: "string" 1425 x-nullable: false 1426 Enabled: 1427 description: "True when the plugin is running. False when the plugin is not running, only installed." 1428 type: "boolean" 1429 x-nullable: false 1430 Settings: 1431 description: "Settings that can be modified by users." 1432 type: "object" 1433 x-nullable: false 1434 required: [Args, Devices, Env, Mounts] 1435 properties: 1436 Mounts: 1437 type: "array" 1438 items: 1439 $ref: "#/definitions/PluginMount" 1440 Env: 1441 type: "array" 1442 items: 1443 type: "string" 1444 Args: 1445 type: "array" 1446 items: 1447 type: "string" 1448 Devices: 1449 type: "array" 1450 items: 1451 $ref: "#/definitions/PluginDevice" 1452 PluginReference: 1453 description: "plugin remote reference used to push/pull the plugin" 1454 type: "string" 1455 x-nullable: false 1456 Config: 1457 description: "The config of a plugin." 1458 type: "object" 1459 x-nullable: false 1460 required: 1461 - Description 1462 - Documentation 1463 - Interface 1464 - Entrypoint 1465 - WorkDir 1466 - Network 1467 - Linux 1468 - PidHost 1469 - PropagatedMount 1470 - IpcHost 1471 - Mounts 1472 - Env 1473 - Args 1474 properties: 1475 DockerVersion: 1476 description: "Docker Version used to create the plugin" 1477 type: "string" 1478 x-nullable: false 1479 Description: 1480 type: "string" 1481 x-nullable: false 1482 Documentation: 1483 type: "string" 1484 x-nullable: false 1485 Interface: 1486 description: "The interface between Docker and the plugin" 1487 x-nullable: false 1488 type: "object" 1489 required: [Types, Socket] 1490 properties: 1491 Types: 1492 type: "array" 1493 items: 1494 $ref: "#/definitions/PluginInterfaceType" 1495 Socket: 1496 type: "string" 1497 x-nullable: false 1498 Entrypoint: 1499 type: "array" 1500 items: 1501 type: "string" 1502 WorkDir: 1503 type: "string" 1504 x-nullable: false 1505 User: 1506 type: "object" 1507 x-nullable: false 1508 properties: 1509 UID: 1510 type: "integer" 1511 format: "uint32" 1512 GID: 1513 type: "integer" 1514 format: "uint32" 1515 Network: 1516 type: "object" 1517 x-nullable: false 1518 required: [Type] 1519 properties: 1520 Type: 1521 x-nullable: false 1522 type: "string" 1523 Linux: 1524 type: "object" 1525 x-nullable: false 1526 required: [Capabilities, AllowAllDevices, Devices] 1527 properties: 1528 Capabilities: 1529 type: "array" 1530 items: 1531 type: "string" 1532 AllowAllDevices: 1533 type: "boolean" 1534 x-nullable: false 1535 Devices: 1536 type: "array" 1537 items: 1538 $ref: "#/definitions/PluginDevice" 1539 PropagatedMount: 1540 type: "string" 1541 x-nullable: false 1542 IpcHost: 1543 type: "boolean" 1544 x-nullable: false 1545 PidHost: 1546 type: "boolean" 1547 x-nullable: false 1548 Mounts: 1549 type: "array" 1550 items: 1551 $ref: "#/definitions/PluginMount" 1552 Env: 1553 type: "array" 1554 items: 1555 $ref: "#/definitions/PluginEnv" 1556 Args: 1557 type: "object" 1558 x-nullable: false 1559 required: [Name, Description, Settable, Value] 1560 properties: 1561 Name: 1562 x-nullable: false 1563 type: "string" 1564 Description: 1565 x-nullable: false 1566 type: "string" 1567 Settable: 1568 type: "array" 1569 items: 1570 type: "string" 1571 Value: 1572 type: "array" 1573 items: 1574 type: "string" 1575 rootfs: 1576 type: "object" 1577 properties: 1578 type: 1579 type: "string" 1580 diff_ids: 1581 type: "array" 1582 items: 1583 type: "string" 1584 example: 1585 Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" 1586 Name: "tiborvass/sample-volume-plugin" 1587 Tag: "latest" 1588 Active: true 1589 Settings: 1590 Env: 1591 - "DEBUG=0" 1592 Args: null 1593 Devices: null 1594 Config: 1595 Description: "A sample volume plugin for Docker" 1596 Documentation: "https://docs.docker.com/engine/extend/plugins/" 1597 Interface: 1598 Types: 1599 - "docker.volumedriver/1.0" 1600 Socket: "plugins.sock" 1601 Entrypoint: 1602 - "/usr/bin/sample-volume-plugin" 1603 - "/data" 1604 WorkDir: "" 1605 User: {} 1606 Network: 1607 Type: "" 1608 Linux: 1609 Capabilities: null 1610 AllowAllDevices: false 1611 Devices: null 1612 Mounts: null 1613 PropagatedMount: "/data" 1614 Env: 1615 - Name: "DEBUG" 1616 Description: "If set, prints debug messages" 1617 Settable: null 1618 Value: "0" 1619 Args: 1620 Name: "args" 1621 Description: "command line arguments" 1622 Settable: null 1623 Value: [] 1624 1625 ObjectVersion: 1626 description: | 1627 The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. 1628 The client must send the version number along with the modified specification when updating these objects. 1629 This approach ensures safe concurrency and determinism in that the change on the object 1630 may not be applied if the version number has changed from the last read. In other words, 1631 if two update requests specify the same base version, only one of the requests can succeed. 1632 As a result, two separate update requests that happen at the same time will not 1633 unintentially overwrite each other. 1634 type: "object" 1635 properties: 1636 Index: 1637 type: "integer" 1638 format: "int64" 1639 1640 NodeSpec: 1641 type: "object" 1642 properties: 1643 Name: 1644 description: "Name for the node." 1645 type: "string" 1646 Labels: 1647 description: "User-defined key/value metadata." 1648 type: "object" 1649 additionalProperties: 1650 type: "string" 1651 Role: 1652 description: "Role of the node." 1653 type: "string" 1654 enum: 1655 - "worker" 1656 - "manager" 1657 Availability: 1658 description: "Availability of the node." 1659 type: "string" 1660 enum: 1661 - "active" 1662 - "pause" 1663 - "drain" 1664 example: 1665 Availability: "active" 1666 Name: "node-name" 1667 Role: "manager" 1668 Labels: 1669 foo: "bar" 1670 Node: 1671 type: "object" 1672 properties: 1673 ID: 1674 type: "string" 1675 Version: 1676 $ref: "#/definitions/ObjectVersion" 1677 CreatedAt: 1678 type: "string" 1679 format: "dateTime" 1680 UpdatedAt: 1681 type: "string" 1682 format: "dateTime" 1683 Spec: 1684 $ref: "#/definitions/NodeSpec" 1685 Description: 1686 type: "object" 1687 properties: 1688 Hostname: 1689 type: "string" 1690 Platform: 1691 type: "object" 1692 properties: 1693 Architecture: 1694 type: "string" 1695 OS: 1696 type: "string" 1697 Resources: 1698 type: "object" 1699 properties: 1700 NanoCPUs: 1701 type: "integer" 1702 format: "int64" 1703 MemoryBytes: 1704 type: "integer" 1705 format: "int64" 1706 Engine: 1707 type: "object" 1708 properties: 1709 EngineVersion: 1710 type: "string" 1711 Labels: 1712 type: "object" 1713 additionalProperties: 1714 type: "string" 1715 Plugins: 1716 type: "array" 1717 items: 1718 type: "object" 1719 properties: 1720 Type: 1721 type: "string" 1722 Name: 1723 type: "string" 1724 TLSInfo: 1725 $ref: "#/definitions/SwarmSpec" 1726 example: 1727 ID: "24ifsmvkjbyhk" 1728 Version: 1729 Index: 8 1730 CreatedAt: "2016-06-07T20:31:11.853781916Z" 1731 UpdatedAt: "2016-06-07T20:31:11.999868824Z" 1732 Spec: 1733 Name: "my-node" 1734 Role: "manager" 1735 Availability: "active" 1736 Labels: 1737 foo: "bar" 1738 Description: 1739 Hostname: "bf3067039e47" 1740 Platform: 1741 Architecture: "x86_64" 1742 OS: "linux" 1743 Resources: 1744 NanoCPUs: 4000000000 1745 MemoryBytes: 8272408576 1746 Engine: 1747 EngineVersion: "17.04.0" 1748 Labels: 1749 foo: "bar" 1750 Plugins: 1751 - Type: "Volume" 1752 Name: "local" 1753 - Type: "Network" 1754 Name: "bridge" 1755 - Type: "Network" 1756 Name: "null" 1757 - Type: "Network" 1758 Name: "overlay" 1759 Status: 1760 State: "ready" 1761 Addr: "172.17.0.2" 1762 ManagerStatus: 1763 Leader: true 1764 Reachability: "reachable" 1765 Addr: "172.17.0.2:2377" 1766 TLSInfo: 1767 TrustRoot: | 1768 -----BEGIN CERTIFICATE----- 1769 MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw 1770 EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 1771 MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH 1772 A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf 1773 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB 1774 Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO 1775 PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz 1776 pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H 1777 -----END CERTIFICATE----- 1778 CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" 1779 CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" 1780 TLSInfo: 1781 description: "Information about the issuer of leaf TLS certificates and the trusted root CA certificate" 1782 type: "object" 1783 properties: 1784 TrustRoot: 1785 description: "The root CA certificate(s) that are used to validate leaf TLS certificates" 1786 type: "string" 1787 CertIssuerSubject: 1788 description: "The base64-url-safe-encoded raw subject bytes of the issuer" 1789 type: "string" 1790 CertIssuerPublicKey: 1791 description: "The base64-url-safe-encoded raw public key bytes of the issuer" 1792 type: "string" 1793 example: 1794 TrustRoot: | 1795 -----BEGIN CERTIFICATE----- 1796 MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw 1797 EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 1798 MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH 1799 A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf 1800 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB 1801 Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO 1802 PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz 1803 pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H 1804 -----END CERTIFICATE----- 1805 CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" 1806 CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" 1807 SwarmSpec: 1808 description: "User modifiable swarm configuration." 1809 type: "object" 1810 properties: 1811 Name: 1812 description: "Name of the swarm." 1813 type: "string" 1814 Labels: 1815 description: "User-defined key/value metadata." 1816 type: "object" 1817 additionalProperties: 1818 type: "string" 1819 Orchestration: 1820 description: "Orchestration configuration." 1821 type: "object" 1822 properties: 1823 TaskHistoryRetentionLimit: 1824 description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks." 1825 type: "integer" 1826 format: "int64" 1827 Raft: 1828 description: "Raft configuration." 1829 type: "object" 1830 properties: 1831 SnapshotInterval: 1832 description: "The number of log entries between snapshots." 1833 type: "integer" 1834 format: "int64" 1835 KeepOldSnapshots: 1836 description: "The number of snapshots to keep beyond the current snapshot." 1837 type: "integer" 1838 format: "int64" 1839 LogEntriesForSlowFollowers: 1840 description: "The number of log entries to keep around to sync up slow followers after a snapshot is created." 1841 type: "integer" 1842 format: "int64" 1843 ElectionTick: 1844 description: | 1845 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`. 1846 1847 A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. 1848 type: "integer" 1849 HeartbeatTick: 1850 description: | 1851 The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. 1852 1853 A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. 1854 type: "integer" 1855 Dispatcher: 1856 description: "Dispatcher configuration." 1857 type: "object" 1858 properties: 1859 HeartbeatPeriod: 1860 description: "The delay for an agent to send a heartbeat to the dispatcher." 1861 type: "integer" 1862 format: "int64" 1863 CAConfig: 1864 description: "CA configuration." 1865 type: "object" 1866 properties: 1867 NodeCertExpiry: 1868 description: "The duration node certificates are issued for." 1869 type: "integer" 1870 format: "int64" 1871 ExternalCAs: 1872 description: "Configuration for forwarding signing requests to an external certificate authority." 1873 type: "array" 1874 items: 1875 type: "object" 1876 properties: 1877 Protocol: 1878 description: "Protocol for communication with the external CA (currently only `cfssl` is supported)." 1879 type: "string" 1880 enum: 1881 - "cfssl" 1882 default: "cfssl" 1883 URL: 1884 description: "URL where certificate signing requests should be sent." 1885 type: "string" 1886 Options: 1887 description: "An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver." 1888 type: "object" 1889 additionalProperties: 1890 type: "string" 1891 CACert: 1892 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)." 1893 type: "string" 1894 SigningCACert: 1895 description: "The desired signing CA certificate for all swarm node TLS leaf certificates, in PEM format." 1896 type: "string" 1897 SigningCAKey: 1898 description: "The desired signing CA key for all swarm node TLS leaf certificates, in PEM format." 1899 type: "string" 1900 ForceRotate: 1901 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`" 1902 EncryptionConfig: 1903 description: "Parameters related to encryption-at-rest." 1904 type: "object" 1905 properties: 1906 AutoLockManagers: 1907 description: "If set, generate a key and use it to lock data stored on the managers." 1908 type: "boolean" 1909 TaskDefaults: 1910 description: "Defaults for creating tasks in this cluster." 1911 type: "object" 1912 properties: 1913 LogDriver: 1914 description: | 1915 The log driver to use for tasks created in the orchestrator if unspecified by a service. 1916 1917 Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. 1918 type: "object" 1919 properties: 1920 Name: 1921 type: "string" 1922 Options: 1923 type: "object" 1924 additionalProperties: 1925 type: "string" 1926 example: 1927 Name: "default" 1928 Orchestration: 1929 TaskHistoryRetentionLimit: 10 1930 Raft: 1931 SnapshotInterval: 10000 1932 LogEntriesForSlowFollowers: 500 1933 HeartbeatTick: 1 1934 ElectionTick: 3 1935 Dispatcher: 1936 HeartbeatPeriod: 5000000000 1937 CAConfig: 1938 NodeCertExpiry: 7776000000000000 1939 JoinTokens: 1940 Worker: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" 1941 Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 1942 EncryptionConfig: 1943 AutoLockManagers: false 1944 # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but 1945 # without `JoinTokens`. 1946 ClusterInfo: 1947 type: "object" 1948 properties: 1949 ID: 1950 description: "The ID of the swarm." 1951 type: "string" 1952 Version: 1953 $ref: "#/definitions/ObjectVersion" 1954 CreatedAt: 1955 type: "string" 1956 format: "dateTime" 1957 UpdatedAt: 1958 type: "string" 1959 format: "dateTime" 1960 Spec: 1961 $ref: "#/definitions/SwarmSpec" 1962 TLSInfo: 1963 $ref: "#/definitions/TLSInfo" 1964 RootRotationInProgress: 1965 description: "Whether there is currently a root CA rotation in progress for the swarm" 1966 type: "boolean" 1967 TaskSpec: 1968 description: "User modifiable task configuration." 1969 type: "object" 1970 properties: 1971 ContainerSpec: 1972 type: "object" 1973 properties: 1974 Image: 1975 description: "The image name to use for the container." 1976 type: "string" 1977 Labels: 1978 description: "User-defined key/value data." 1979 type: "object" 1980 additionalProperties: 1981 type: "string" 1982 Command: 1983 description: "The command to be run in the image." 1984 type: "array" 1985 items: 1986 type: "string" 1987 Args: 1988 description: "Arguments to the command." 1989 type: "array" 1990 items: 1991 type: "string" 1992 Hostname: 1993 description: "The hostname to use for the container, as a valid RFC 1123 hostname." 1994 type: "string" 1995 Env: 1996 description: "A list of environment variables in the form `VAR=value`." 1997 type: "array" 1998 items: 1999 type: "string" 2000 Dir: 2001 description: "The working directory for commands to run in." 2002 type: "string" 2003 User: 2004 description: "The user inside the container." 2005 type: "string" 2006 Groups: 2007 type: "array" 2008 description: "A list of additional groups that the container process will run as." 2009 items: 2010 type: "string" 2011 TTY: 2012 description: "Whether a pseudo-TTY should be allocated." 2013 type: "boolean" 2014 OpenStdin: 2015 description: "Open `stdin`" 2016 type: "boolean" 2017 ReadOnly: 2018 description: "Mount the container's root filesystem as read only." 2019 type: "boolean" 2020 Mounts: 2021 description: "Specification for mounts to be added to containers created as part of the service." 2022 type: "array" 2023 items: 2024 $ref: "#/definitions/Mount" 2025 StopSignal: 2026 description: "Signal to stop the container." 2027 type: "string" 2028 StopGracePeriod: 2029 description: "Amount of time to wait for the container to terminate before forcefully killing it." 2030 type: "integer" 2031 format: "int64" 2032 HealthCheck: 2033 $ref: "#/definitions/HealthConfig" 2034 Hosts: 2035 type: "array" 2036 description: | 2037 A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. 2038 The format of extra hosts on swarmkit is specified in: 2039 http://man7.org/linux/man-pages/man5/hosts.5.html 2040 IP_address canonical_hostname [aliases...] 2041 items: 2042 type: "string" 2043 DNSConfig: 2044 description: "Specification for DNS related configurations in resolver configuration file (`resolv.conf`)." 2045 type: "object" 2046 properties: 2047 Nameservers: 2048 description: "The IP addresses of the name servers." 2049 type: "array" 2050 items: 2051 type: "string" 2052 Search: 2053 description: "A search list for host-name lookup." 2054 type: "array" 2055 items: 2056 type: "string" 2057 Options: 2058 description: "A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.)." 2059 type: "array" 2060 items: 2061 type: "string" 2062 Secrets: 2063 description: "Secrets contains references to zero or more secrets that will be exposed to the service." 2064 type: "array" 2065 items: 2066 type: "object" 2067 properties: 2068 File: 2069 description: "File represents a specific target that is backed by a file." 2070 type: "object" 2071 properties: 2072 Name: 2073 description: "Name represents the final filename in the filesystem." 2074 type: "string" 2075 UID: 2076 description: "UID represents the file UID." 2077 type: "string" 2078 GID: 2079 description: "GID represents the file GID." 2080 type: "string" 2081 Mode: 2082 description: "Mode represents the FileMode of the file." 2083 type: "integer" 2084 format: "uint32" 2085 SecretID: 2086 description: "SecretID represents the ID of the specific secret that we're referencing." 2087 type: "string" 2088 SecretName: 2089 description: | 2090 SecretName is the name of the secret that this references, but this is just provided for 2091 lookup/display purposes. The secret in the reference will be identified by its ID. 2092 type: "string" 2093 2094 Resources: 2095 description: "Resource requirements which apply to each individual container created as part of the service." 2096 type: "object" 2097 properties: 2098 Limits: 2099 description: "Define resources limits." 2100 type: "object" 2101 properties: 2102 NanoCPUs: 2103 description: "CPU limit in units of 10<sup>-9</sup> CPU shares." 2104 type: "integer" 2105 format: "int64" 2106 MemoryBytes: 2107 description: "Memory limit in Bytes." 2108 type: "integer" 2109 format: "int64" 2110 Reservation: 2111 description: "Define resources reservation." 2112 properties: 2113 NanoCPUs: 2114 description: "CPU reservation in units of 10<sup>-9</sup> CPU shares." 2115 type: "integer" 2116 format: "int64" 2117 MemoryBytes: 2118 description: "Memory reservation in Bytes." 2119 type: "integer" 2120 format: "int64" 2121 RestartPolicy: 2122 description: "Specification for the restart policy which applies to containers created as part of this service." 2123 type: "object" 2124 properties: 2125 Condition: 2126 description: "Condition for restart." 2127 type: "string" 2128 enum: 2129 - "none" 2130 - "on-failure" 2131 - "any" 2132 Delay: 2133 description: "Delay between restart attempts." 2134 type: "integer" 2135 format: "int64" 2136 MaxAttempts: 2137 description: "Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)." 2138 type: "integer" 2139 format: "int64" 2140 default: 0 2141 Window: 2142 description: "Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded)." 2143 type: "integer" 2144 format: "int64" 2145 default: 0 2146 Placement: 2147 type: "object" 2148 properties: 2149 Constraints: 2150 description: "An array of constraints." 2151 type: "array" 2152 items: 2153 type: "string" 2154 Preferences: 2155 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." 2156 type: "array" 2157 items: 2158 type: "object" 2159 properties: 2160 Spread: 2161 type: "object" 2162 properties: 2163 SpreadDescriptor: 2164 description: "label descriptor, such as engine.labels.az" 2165 type: "string" 2166 Platforms: 2167 description: "An array of supported platforms." 2168 type: "array" 2169 items: 2170 type: "object" 2171 properties: 2172 Architecture: 2173 type: "string" 2174 OS: 2175 type: "string" 2176 ForceUpdate: 2177 description: "A counter that triggers an update even if no relevant parameters have been changed." 2178 type: "integer" 2179 Runtime: 2180 description: "Runtime is the type of runtime specified for the task executor." 2181 type: "string" 2182 Networks: 2183 type: "array" 2184 items: 2185 type: "object" 2186 properties: 2187 Target: 2188 type: "string" 2189 Aliases: 2190 type: "array" 2191 items: 2192 type: "string" 2193 LogDriver: 2194 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." 2195 type: "object" 2196 properties: 2197 Name: 2198 type: "string" 2199 Options: 2200 type: "object" 2201 additionalProperties: 2202 type: "string" 2203 TaskState: 2204 type: "string" 2205 enum: 2206 - "new" 2207 - "allocated" 2208 - "pending" 2209 - "assigned" 2210 - "accepted" 2211 - "preparing" 2212 - "ready" 2213 - "starting" 2214 - "running" 2215 - "complete" 2216 - "shutdown" 2217 - "failed" 2218 - "rejected" 2219 Task: 2220 type: "object" 2221 properties: 2222 ID: 2223 description: "The ID of the task." 2224 type: "string" 2225 Version: 2226 $ref: "#/definitions/ObjectVersion" 2227 CreatedAt: 2228 type: "string" 2229 format: "dateTime" 2230 UpdatedAt: 2231 type: "string" 2232 format: "dateTime" 2233 Name: 2234 description: "Name of the task." 2235 type: "string" 2236 Labels: 2237 description: "User-defined key/value metadata." 2238 type: "object" 2239 additionalProperties: 2240 type: "string" 2241 Spec: 2242 $ref: "#/definitions/TaskSpec" 2243 ServiceID: 2244 description: "The ID of the service this task is part of." 2245 type: "string" 2246 Slot: 2247 type: "integer" 2248 NodeID: 2249 description: "The ID of the node that this task is on." 2250 type: "string" 2251 Status: 2252 type: "object" 2253 properties: 2254 Timestamp: 2255 type: "string" 2256 format: "dateTime" 2257 State: 2258 $ref: "#/definitions/TaskState" 2259 Message: 2260 type: "string" 2261 Err: 2262 type: "string" 2263 ContainerStatus: 2264 type: "object" 2265 properties: 2266 ContainerID: 2267 type: "string" 2268 PID: 2269 type: "integer" 2270 ExitCode: 2271 type: "integer" 2272 DesiredState: 2273 $ref: "#/definitions/TaskState" 2274 example: 2275 ID: "0kzzo1i0y4jz6027t0k7aezc7" 2276 Version: 2277 Index: 71 2278 CreatedAt: "2016-06-07T21:07:31.171892745Z" 2279 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 2280 Spec: 2281 ContainerSpec: 2282 Image: "redis" 2283 Resources: 2284 Limits: {} 2285 Reservations: {} 2286 RestartPolicy: 2287 Condition: "any" 2288 MaxAttempts: 0 2289 Placement: {} 2290 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 2291 Slot: 1 2292 NodeID: "60gvrl6tm78dmak4yl7srz94v" 2293 Status: 2294 Timestamp: "2016-06-07T21:07:31.290032978Z" 2295 State: "running" 2296 Message: "started" 2297 ContainerStatus: 2298 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 2299 PID: 677 2300 DesiredState: "running" 2301 NetworksAttachments: 2302 - Network: 2303 ID: "4qvuz4ko70xaltuqbt8956gd1" 2304 Version: 2305 Index: 18 2306 CreatedAt: "2016-06-07T20:31:11.912919752Z" 2307 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 2308 Spec: 2309 Name: "ingress" 2310 Labels: 2311 com.docker.swarm.internal: "true" 2312 DriverConfiguration: {} 2313 IPAMOptions: 2314 Driver: {} 2315 Configs: 2316 - Subnet: "10.255.0.0/16" 2317 Gateway: "10.255.0.1" 2318 DriverState: 2319 Name: "overlay" 2320 Options: 2321 com.docker.network.driver.overlay.vxlanid_list: "256" 2322 IPAMOptions: 2323 Driver: 2324 Name: "default" 2325 Configs: 2326 - Subnet: "10.255.0.0/16" 2327 Gateway: "10.255.0.1" 2328 Addresses: 2329 - "10.255.0.10/16" 2330 ServiceSpec: 2331 description: "User modifiable configuration for a service." 2332 properties: 2333 Name: 2334 description: "Name of the service." 2335 type: "string" 2336 Labels: 2337 description: "User-defined key/value metadata." 2338 type: "object" 2339 additionalProperties: 2340 type: "string" 2341 TaskTemplate: 2342 $ref: "#/definitions/TaskSpec" 2343 Mode: 2344 description: "Scheduling mode for the service." 2345 type: "object" 2346 properties: 2347 Replicated: 2348 type: "object" 2349 properties: 2350 Replicas: 2351 type: "integer" 2352 format: "int64" 2353 Global: 2354 type: "object" 2355 UpdateConfig: 2356 description: "Specification for the update strategy of the service." 2357 type: "object" 2358 properties: 2359 Parallelism: 2360 description: "Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism)." 2361 type: "integer" 2362 format: "int64" 2363 Delay: 2364 description: "Amount of time between updates, in nanoseconds." 2365 type: "integer" 2366 format: "int64" 2367 FailureAction: 2368 description: "Action to take if an updated task fails to run, or stops running during the update." 2369 type: "string" 2370 enum: 2371 - "continue" 2372 - "pause" 2373 - "rollback" 2374 Monitor: 2375 description: "Amount of time to monitor each updated task for failures, in nanoseconds." 2376 type: "integer" 2377 format: "int64" 2378 MaxFailureRatio: 2379 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." 2380 type: "number" 2381 default: 0 2382 Order: 2383 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." 2384 type: "string" 2385 enum: 2386 - "stop-first" 2387 - "start-first" 2388 RollbackConfig: 2389 description: "Specification for the rollback strategy of the service." 2390 type: "object" 2391 properties: 2392 Parallelism: 2393 description: "Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism)." 2394 type: "integer" 2395 format: "int64" 2396 Delay: 2397 description: "Amount of time between rollback iterations, in nanoseconds." 2398 type: "integer" 2399 format: "int64" 2400 FailureAction: 2401 description: "Action to take if an rolled back task fails to run, or stops running during the rollback." 2402 type: "string" 2403 enum: 2404 - "continue" 2405 - "pause" 2406 Monitor: 2407 description: "Amount of time to monitor each rolled back task for failures, in nanoseconds." 2408 type: "integer" 2409 format: "int64" 2410 MaxFailureRatio: 2411 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." 2412 type: "number" 2413 default: 0 2414 Order: 2415 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." 2416 type: "string" 2417 enum: 2418 - "stop-first" 2419 - "start-first" 2420 Networks: 2421 description: "Array of network names or IDs to attach the service to." 2422 type: "array" 2423 items: 2424 type: "object" 2425 properties: 2426 Target: 2427 type: "string" 2428 Aliases: 2429 type: "array" 2430 items: 2431 type: "string" 2432 EndpointSpec: 2433 $ref: "#/definitions/EndpointSpec" 2434 EndpointPortConfig: 2435 type: "object" 2436 properties: 2437 Name: 2438 type: "string" 2439 Protocol: 2440 type: "string" 2441 enum: 2442 - "tcp" 2443 - "udp" 2444 TargetPort: 2445 description: "The port inside the container." 2446 type: "integer" 2447 PublishedPort: 2448 description: "The port on the swarm hosts." 2449 type: "integer" 2450 EndpointSpec: 2451 description: "Properties that can be configured to access and load balance a service." 2452 type: "object" 2453 properties: 2454 Mode: 2455 description: "The mode of resolution to use for internal load balancing 2456 between tasks." 2457 type: "string" 2458 enum: 2459 - "vip" 2460 - "dnsrr" 2461 default: "vip" 2462 Ports: 2463 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." 2464 type: "array" 2465 items: 2466 $ref: "#/definitions/EndpointPortConfig" 2467 Service: 2468 type: "object" 2469 properties: 2470 ID: 2471 type: "string" 2472 Version: 2473 $ref: "#/definitions/ObjectVersion" 2474 CreatedAt: 2475 type: "string" 2476 format: "dateTime" 2477 UpdatedAt: 2478 type: "string" 2479 format: "dateTime" 2480 Spec: 2481 $ref: "#/definitions/ServiceSpec" 2482 Endpoint: 2483 type: "object" 2484 properties: 2485 Spec: 2486 $ref: "#/definitions/EndpointSpec" 2487 Ports: 2488 type: "array" 2489 items: 2490 $ref: "#/definitions/EndpointPortConfig" 2491 VirtualIPs: 2492 type: "array" 2493 items: 2494 type: "object" 2495 properties: 2496 NetworkID: 2497 type: "string" 2498 Addr: 2499 type: "string" 2500 UpdateStatus: 2501 description: "The status of a service update." 2502 type: "object" 2503 properties: 2504 State: 2505 type: "string" 2506 enum: 2507 - "updating" 2508 - "paused" 2509 - "completed" 2510 StartedAt: 2511 type: "string" 2512 format: "dateTime" 2513 CompletedAt: 2514 type: "string" 2515 format: "dateTime" 2516 Message: 2517 type: "string" 2518 example: 2519 ID: "9mnpnzenvg8p8tdbtq4wvbkcz" 2520 Version: 2521 Index: 19 2522 CreatedAt: "2016-06-07T21:05:51.880065305Z" 2523 UpdatedAt: "2016-06-07T21:07:29.962229872Z" 2524 Spec: 2525 Name: "hopeful_cori" 2526 TaskTemplate: 2527 ContainerSpec: 2528 Image: "redis" 2529 Resources: 2530 Limits: {} 2531 Reservations: {} 2532 RestartPolicy: 2533 Condition: "any" 2534 MaxAttempts: 0 2535 Placement: {} 2536 ForceUpdate: 0 2537 Mode: 2538 Replicated: 2539 Replicas: 1 2540 UpdateConfig: 2541 Parallelism: 1 2542 Delay: 1000000000 2543 FailureAction: "pause" 2544 Monitor: 15000000000 2545 MaxFailureRatio: 0.15 2546 RollbackConfig: 2547 Parallelism: 1 2548 Delay: 1000000000 2549 FailureAction: "pause" 2550 Monitor: 15000000000 2551 MaxFailureRatio: 0.15 2552 EndpointSpec: 2553 Mode: "vip" 2554 Ports: 2555 - 2556 Protocol: "tcp" 2557 TargetPort: 6379 2558 PublishedPort: 30001 2559 Endpoint: 2560 Spec: 2561 Mode: "vip" 2562 Ports: 2563 - 2564 Protocol: "tcp" 2565 TargetPort: 6379 2566 PublishedPort: 30001 2567 Ports: 2568 - 2569 Protocol: "tcp" 2570 TargetPort: 6379 2571 PublishedPort: 30001 2572 VirtualIPs: 2573 - 2574 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 2575 Addr: "10.255.0.2/16" 2576 - 2577 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 2578 Addr: "10.255.0.3/16" 2579 ImageDeleteResponseItem: 2580 type: "object" 2581 properties: 2582 Untagged: 2583 description: "The image ID of an image that was untagged" 2584 type: "string" 2585 Deleted: 2586 description: "The image ID of an image that was deleted" 2587 type: "string" 2588 ServiceUpdateResponse: 2589 type: "object" 2590 properties: 2591 Warnings: 2592 description: "Optional warning messages" 2593 type: "array" 2594 items: 2595 type: "string" 2596 example: 2597 Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" 2598 ContainerSummary: 2599 type: "array" 2600 items: 2601 type: "object" 2602 properties: 2603 Id: 2604 description: "The ID of this container" 2605 type: "string" 2606 x-go-name: "ID" 2607 Names: 2608 description: "The names that this container has been given" 2609 type: "array" 2610 items: 2611 type: "string" 2612 Image: 2613 description: "The name of the image used when creating this container" 2614 type: "string" 2615 ImageID: 2616 description: "The ID of the image that this container was created from" 2617 type: "string" 2618 Command: 2619 description: "Command to run when starting the container" 2620 type: "string" 2621 Created: 2622 description: "When the container was created" 2623 type: "integer" 2624 format: "int64" 2625 Ports: 2626 description: "The ports exposed by this container" 2627 type: "array" 2628 items: 2629 $ref: "#/definitions/Port" 2630 SizeRw: 2631 description: "The size of files that have been created or changed by this container" 2632 type: "integer" 2633 format: "int64" 2634 SizeRootFs: 2635 description: "The total size of all the files in this container" 2636 type: "integer" 2637 format: "int64" 2638 Labels: 2639 description: "User-defined key/value metadata." 2640 type: "object" 2641 additionalProperties: 2642 type: "string" 2643 State: 2644 description: "The state of this container (e.g. `Exited`)" 2645 type: "string" 2646 Status: 2647 description: "Additional human-readable status of this container (e.g. `Exit 0`)" 2648 type: "string" 2649 HostConfig: 2650 type: "object" 2651 properties: 2652 NetworkMode: 2653 type: "string" 2654 NetworkSettings: 2655 description: "A summary of the container's network settings" 2656 type: "object" 2657 properties: 2658 Networks: 2659 type: "object" 2660 additionalProperties: 2661 $ref: "#/definitions/EndpointSettings" 2662 Mounts: 2663 type: "array" 2664 items: 2665 $ref: "#/definitions/Mount" 2666 SecretSpec: 2667 type: "object" 2668 properties: 2669 Name: 2670 description: "User-defined name of the secret." 2671 type: "string" 2672 Labels: 2673 description: "User-defined key/value metadata." 2674 type: "object" 2675 additionalProperties: 2676 type: "string" 2677 Data: 2678 description: "Base64-url-safe-encoded secret data" 2679 type: "array" 2680 items: 2681 type: "string" 2682 Secret: 2683 type: "object" 2684 properties: 2685 ID: 2686 type: "string" 2687 Version: 2688 $ref: "#/definitions/ObjectVersion" 2689 CreatedAt: 2690 type: "string" 2691 format: "dateTime" 2692 UpdatedAt: 2693 type: "string" 2694 format: "dateTime" 2695 Spec: 2696 $ref: "#/definitions/ServiceSpec" 2697 paths: 2698 /containers/json: 2699 get: 2700 summary: "List containers" 2701 description: | 2702 Returns a list of containers. For details on the format, see [the inspect endpoint](#operation/ContainerInspect). 2703 2704 Note that it uses a different, smaller representation of a container than inspecting a single container. For example, 2705 the list of linked containers is not propagated . 2706 operationId: "ContainerList" 2707 produces: 2708 - "application/json" 2709 parameters: 2710 - name: "all" 2711 in: "query" 2712 description: "Return all containers. By default, only running containers are shown" 2713 type: "boolean" 2714 default: false 2715 - name: "limit" 2716 in: "query" 2717 description: "Return this number of most recently created containers, including non-running ones." 2718 type: "integer" 2719 - name: "size" 2720 in: "query" 2721 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`." 2722 type: "boolean" 2723 default: false 2724 - name: "filters" 2725 in: "query" 2726 description: | 2727 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: 2728 2729 - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`) 2730 - `before`=(`<container id>` or `<container name>`) 2731 - `expose`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 2732 - `exited=<int>` containers with exit code of `<int>` 2733 - `health`=(`starting`|`healthy`|`unhealthy`|`none`) 2734 - `id=<ID>` a container's ID 2735 - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) 2736 - `is-task=`(`true`|`false`) 2737 - `label=key` or `label="key=value"` of a container label 2738 - `name=<name>` a container's name 2739 - `network`=(`<network id>` or `<network name>`) 2740 - `publish`=(`<port>[/<proto>]`|`<startport-endport>/[<proto>]`) 2741 - `since`=(`<container id>` or `<container name>`) 2742 - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) 2743 - `volume`=(`<volume name>` or `<mount point destination>`) 2744 type: "string" 2745 responses: 2746 200: 2747 description: "no error" 2748 schema: 2749 $ref: "#/definitions/ContainerSummary" 2750 examples: 2751 application/json: 2752 - Id: "8dfafdbc3a40" 2753 Names: 2754 - "/boring_feynman" 2755 Image: "ubuntu:latest" 2756 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 2757 Command: "echo 1" 2758 Created: 1367854155 2759 State: "Exited" 2760 Status: "Exit 0" 2761 Ports: 2762 - PrivatePort: 2222 2763 PublicPort: 3333 2764 Type: "tcp" 2765 Labels: 2766 com.example.vendor: "Acme" 2767 com.example.license: "GPL" 2768 com.example.version: "1.0" 2769 SizeRw: 12288 2770 SizeRootFs: 0 2771 HostConfig: 2772 NetworkMode: "default" 2773 NetworkSettings: 2774 Networks: 2775 bridge: 2776 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 2777 EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" 2778 Gateway: "172.17.0.1" 2779 IPAddress: "172.17.0.2" 2780 IPPrefixLen: 16 2781 IPv6Gateway: "" 2782 GlobalIPv6Address: "" 2783 GlobalIPv6PrefixLen: 0 2784 MacAddress: "02:42:ac:11:00:02" 2785 Mounts: 2786 - Name: "fac362...80535" 2787 Source: "/data" 2788 Destination: "/data" 2789 Driver: "local" 2790 Mode: "ro,Z" 2791 RW: false 2792 Propagation: "" 2793 - Id: "9cd87474be90" 2794 Names: 2795 - "/coolName" 2796 Image: "ubuntu:latest" 2797 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 2798 Command: "echo 222222" 2799 Created: 1367854155 2800 State: "Exited" 2801 Status: "Exit 0" 2802 Ports: [] 2803 Labels: {} 2804 SizeRw: 12288 2805 SizeRootFs: 0 2806 HostConfig: 2807 NetworkMode: "default" 2808 NetworkSettings: 2809 Networks: 2810 bridge: 2811 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 2812 EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" 2813 Gateway: "172.17.0.1" 2814 IPAddress: "172.17.0.8" 2815 IPPrefixLen: 16 2816 IPv6Gateway: "" 2817 GlobalIPv6Address: "" 2818 GlobalIPv6PrefixLen: 0 2819 MacAddress: "02:42:ac:11:00:08" 2820 Mounts: [] 2821 - Id: "3176a2479c92" 2822 Names: 2823 - "/sleepy_dog" 2824 Image: "ubuntu:latest" 2825 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 2826 Command: "echo 3333333333333333" 2827 Created: 1367854154 2828 State: "Exited" 2829 Status: "Exit 0" 2830 Ports: [] 2831 Labels: {} 2832 SizeRw: 12288 2833 SizeRootFs: 0 2834 HostConfig: 2835 NetworkMode: "default" 2836 NetworkSettings: 2837 Networks: 2838 bridge: 2839 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 2840 EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" 2841 Gateway: "172.17.0.1" 2842 IPAddress: "172.17.0.6" 2843 IPPrefixLen: 16 2844 IPv6Gateway: "" 2845 GlobalIPv6Address: "" 2846 GlobalIPv6PrefixLen: 0 2847 MacAddress: "02:42:ac:11:00:06" 2848 Mounts: [] 2849 - Id: "4cb07b47f9fb" 2850 Names: 2851 - "/running_cat" 2852 Image: "ubuntu:latest" 2853 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 2854 Command: "echo 444444444444444444444444444444444" 2855 Created: 1367854152 2856 State: "Exited" 2857 Status: "Exit 0" 2858 Ports: [] 2859 Labels: {} 2860 SizeRw: 12288 2861 SizeRootFs: 0 2862 HostConfig: 2863 NetworkMode: "default" 2864 NetworkSettings: 2865 Networks: 2866 bridge: 2867 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 2868 EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" 2869 Gateway: "172.17.0.1" 2870 IPAddress: "172.17.0.5" 2871 IPPrefixLen: 16 2872 IPv6Gateway: "" 2873 GlobalIPv6Address: "" 2874 GlobalIPv6PrefixLen: 0 2875 MacAddress: "02:42:ac:11:00:05" 2876 Mounts: [] 2877 400: 2878 description: "bad parameter" 2879 schema: 2880 $ref: "#/definitions/ErrorResponse" 2881 500: 2882 description: "server error" 2883 schema: 2884 $ref: "#/definitions/ErrorResponse" 2885 tags: ["Container"] 2886 /containers/create: 2887 post: 2888 summary: "Create a container" 2889 operationId: "ContainerCreate" 2890 consumes: 2891 - "application/json" 2892 - "application/octet-stream" 2893 produces: 2894 - "application/json" 2895 parameters: 2896 - name: "name" 2897 in: "query" 2898 description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`." 2899 type: "string" 2900 pattern: "/?[a-zA-Z0-9_-]+" 2901 - name: "body" 2902 in: "body" 2903 description: "Container to create" 2904 schema: 2905 allOf: 2906 - $ref: "#/definitions/Config" 2907 - type: "object" 2908 properties: 2909 HostConfig: 2910 $ref: "#/definitions/HostConfig" 2911 NetworkingConfig: 2912 description: "This container's networking configuration." 2913 type: "object" 2914 properties: 2915 EndpointsConfig: 2916 description: "A mapping of network name to endpoint configuration for that network." 2917 type: "object" 2918 additionalProperties: 2919 $ref: "#/definitions/EndpointSettings" 2920 example: 2921 Hostname: "" 2922 Domainname: "" 2923 User: "" 2924 AttachStdin: false 2925 AttachStdout: true 2926 AttachStderr: true 2927 Tty: false 2928 OpenStdin: false 2929 StdinOnce: false 2930 Env: 2931 - "FOO=bar" 2932 - "BAZ=quux" 2933 Cmd: 2934 - "date" 2935 Entrypoint: "" 2936 Image: "ubuntu" 2937 Labels: 2938 com.example.vendor: "Acme" 2939 com.example.license: "GPL" 2940 com.example.version: "1.0" 2941 Volumes: 2942 /volumes/data: {} 2943 WorkingDir: "" 2944 NetworkDisabled: false 2945 MacAddress: "12:34:56:78:9a:bc" 2946 ExposedPorts: 2947 22/tcp: {} 2948 StopSignal: "SIGTERM" 2949 StopTimeout: 10 2950 HostConfig: 2951 Binds: 2952 - "/tmp:/tmp" 2953 Links: 2954 - "redis3:redis" 2955 Memory: 0 2956 MemorySwap: 0 2957 MemoryReservation: 0 2958 KernelMemory: 0 2959 NanoCPUs: 500000 2960 CpuPercent: 80 2961 CpuShares: 512 2962 CpuPeriod: 100000 2963 CpuRealtimePeriod: 1000000 2964 CpuRealtimeRuntime: 10000 2965 CpuQuota: 50000 2966 CpusetCpus: "0,1" 2967 CpusetMems: "0,1" 2968 MaximumIOps: 0 2969 MaximumIOBps: 0 2970 BlkioWeight: 300 2971 BlkioWeightDevice: 2972 - {} 2973 BlkioDeviceReadBps: 2974 - {} 2975 BlkioDeviceReadIOps: 2976 - {} 2977 BlkioDeviceWriteBps: 2978 - {} 2979 BlkioDeviceWriteIOps: 2980 - {} 2981 MemorySwappiness: 60 2982 OomKillDisable: false 2983 OomScoreAdj: 500 2984 PidMode: "" 2985 PidsLimit: -1 2986 PortBindings: 2987 22/tcp: 2988 - HostPort: "11022" 2989 PublishAllPorts: false 2990 Privileged: false 2991 ReadonlyRootfs: false 2992 Dns: 2993 - "8.8.8.8" 2994 DnsOptions: 2995 - "" 2996 DnsSearch: 2997 - "" 2998 VolumesFrom: 2999 - "parent" 3000 - "other:ro" 3001 CapAdd: 3002 - "NET_ADMIN" 3003 CapDrop: 3004 - "MKNOD" 3005 GroupAdd: 3006 - "newgroup" 3007 RestartPolicy: 3008 Name: "" 3009 MaximumRetryCount: 0 3010 AutoRemove: true 3011 NetworkMode: "bridge" 3012 Devices: [] 3013 Ulimits: 3014 - {} 3015 LogConfig: 3016 Type: "json-file" 3017 Config: {} 3018 SecurityOpt: [] 3019 StorageOpt: {} 3020 CgroupParent: "" 3021 VolumeDriver: "" 3022 ShmSize: 67108864 3023 NetworkingConfig: 3024 EndpointsConfig: 3025 isolated_nw: 3026 IPAMConfig: 3027 IPv4Address: "172.20.30.33" 3028 IPv6Address: "2001:db8:abcd::3033" 3029 LinkLocalIPs: 3030 - "169.254.34.68" 3031 - "fe80::3468" 3032 Links: 3033 - "container_1" 3034 - "container_2" 3035 Aliases: 3036 - "server_x" 3037 - "server_y" 3038 3039 required: true 3040 responses: 3041 201: 3042 description: "Container created successfully" 3043 schema: 3044 type: "object" 3045 required: [Id, Warnings] 3046 properties: 3047 Id: 3048 description: "The ID of the created container" 3049 type: "string" 3050 x-nullable: false 3051 Warnings: 3052 description: "Warnings encountered when creating the container" 3053 type: "array" 3054 x-nullable: false 3055 items: 3056 type: "string" 3057 examples: 3058 application/json: 3059 Id: "e90e34656806" 3060 Warnings: [] 3061 400: 3062 description: "bad parameter" 3063 schema: 3064 $ref: "#/definitions/ErrorResponse" 3065 404: 3066 description: "no such container" 3067 schema: 3068 $ref: "#/definitions/ErrorResponse" 3069 examples: 3070 application/json: 3071 message: "No such container: c2ada9df5af8" 3072 406: 3073 description: "impossible to attach" 3074 schema: 3075 $ref: "#/definitions/ErrorResponse" 3076 409: 3077 description: "conflict" 3078 schema: 3079 $ref: "#/definitions/ErrorResponse" 3080 500: 3081 description: "server error" 3082 schema: 3083 $ref: "#/definitions/ErrorResponse" 3084 tags: ["Container"] 3085 /containers/{id}/json: 3086 get: 3087 summary: "Inspect a container" 3088 description: "Return low-level information about a container." 3089 operationId: "ContainerInspect" 3090 produces: 3091 - "application/json" 3092 responses: 3093 200: 3094 description: "no error" 3095 schema: 3096 type: "object" 3097 properties: 3098 Id: 3099 description: "The ID of the container" 3100 type: "string" 3101 Created: 3102 description: "The time the container was created" 3103 type: "string" 3104 Path: 3105 description: "The path to the command being run" 3106 type: "string" 3107 Args: 3108 description: "The arguments to the command being run" 3109 type: "array" 3110 items: 3111 type: "string" 3112 State: 3113 description: "The state of the container." 3114 type: "object" 3115 properties: 3116 Status: 3117 description: | 3118 The status of the container. For example, `"running"` or `"exited"`. 3119 type: "string" 3120 enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] 3121 Running: 3122 description: | 3123 Whether this container is running. 3124 3125 Note that a running container can be _paused_. The `Running` and `Paused` 3126 booleans are not mutually exclusive: 3127 3128 When pausing a container (on Linux), the cgroups freezer is used to suspend 3129 all processes in the container. Freezing the process requires the process to 3130 be running. As a result, paused containers are both `Running` _and_ `Paused`. 3131 3132 Use the `Status` field instead to determine if a container's state is "running". 3133 type: "boolean" 3134 Paused: 3135 description: "Whether this container is paused." 3136 type: "boolean" 3137 Restarting: 3138 description: "Whether this container is restarting." 3139 type: "boolean" 3140 OOMKilled: 3141 description: "Whether this container has been killed because it ran out of memory." 3142 type: "boolean" 3143 Dead: 3144 type: "boolean" 3145 Pid: 3146 description: "The process ID of this container" 3147 type: "integer" 3148 ExitCode: 3149 description: "The last exit code of this container" 3150 type: "integer" 3151 Error: 3152 type: "string" 3153 StartedAt: 3154 description: "The time when this container was last started." 3155 type: "string" 3156 FinishedAt: 3157 description: "The time when this container last exited." 3158 type: "string" 3159 Image: 3160 description: "The container's image" 3161 type: "string" 3162 ResolvConfPath: 3163 type: "string" 3164 HostnamePath: 3165 type: "string" 3166 HostsPath: 3167 type: "string" 3168 LogPath: 3169 type: "string" 3170 Node: 3171 description: "TODO" 3172 type: "object" 3173 Name: 3174 type: "string" 3175 RestartCount: 3176 type: "integer" 3177 Driver: 3178 type: "string" 3179 MountLabel: 3180 type: "string" 3181 ProcessLabel: 3182 type: "string" 3183 AppArmorProfile: 3184 type: "string" 3185 ExecIDs: 3186 type: "string" 3187 HostConfig: 3188 $ref: "#/definitions/HostConfig" 3189 GraphDriver: 3190 $ref: "#/definitions/GraphDriverData" 3191 SizeRw: 3192 description: "The size of files that have been created or changed by this container." 3193 type: "integer" 3194 format: "int64" 3195 SizeRootFs: 3196 description: "The total size of all the files in this container." 3197 type: "integer" 3198 format: "int64" 3199 Mounts: 3200 type: "array" 3201 items: 3202 $ref: "#/definitions/MountPoint" 3203 Config: 3204 $ref: "#/definitions/Config" 3205 NetworkSettings: 3206 $ref: "#/definitions/NetworkConfig" 3207 examples: 3208 application/json: 3209 AppArmorProfile: "" 3210 Args: 3211 - "-c" 3212 - "exit 9" 3213 Config: 3214 AttachStderr: true 3215 AttachStdin: false 3216 AttachStdout: true 3217 Cmd: 3218 - "/bin/sh" 3219 - "-c" 3220 - "exit 9" 3221 Domainname: "" 3222 Env: 3223 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 3224 Hostname: "ba033ac44011" 3225 Image: "ubuntu" 3226 Labels: 3227 com.example.vendor: "Acme" 3228 com.example.license: "GPL" 3229 com.example.version: "1.0" 3230 MacAddress: "" 3231 NetworkDisabled: false 3232 OpenStdin: false 3233 StdinOnce: false 3234 Tty: false 3235 User: "" 3236 Volumes: 3237 /volumes/data: {} 3238 WorkingDir: "" 3239 StopSignal: "SIGTERM" 3240 StopTimeout: 10 3241 Created: "2015-01-06T15:47:31.485331387Z" 3242 Driver: "devicemapper" 3243 HostConfig: 3244 MaximumIOps: 0 3245 MaximumIOBps: 0 3246 BlkioWeight: 0 3247 BlkioWeightDevice: 3248 - {} 3249 BlkioDeviceReadBps: 3250 - {} 3251 BlkioDeviceWriteBps: 3252 - {} 3253 BlkioDeviceReadIOps: 3254 - {} 3255 BlkioDeviceWriteIOps: 3256 - {} 3257 ContainerIDFile: "" 3258 CpusetCpus: "" 3259 CpusetMems: "" 3260 CpuPercent: 80 3261 CpuShares: 0 3262 CpuPeriod: 100000 3263 CpuRealtimePeriod: 1000000 3264 CpuRealtimeRuntime: 10000 3265 Devices: [] 3266 IpcMode: "" 3267 LxcConf: [] 3268 Memory: 0 3269 MemorySwap: 0 3270 MemoryReservation: 0 3271 KernelMemory: 0 3272 OomKillDisable: false 3273 OomScoreAdj: 500 3274 NetworkMode: "bridge" 3275 PidMode: "" 3276 PortBindings: {} 3277 Privileged: false 3278 ReadonlyRootfs: false 3279 PublishAllPorts: false 3280 RestartPolicy: 3281 MaximumRetryCount: 2 3282 Name: "on-failure" 3283 LogConfig: 3284 Type: "json-file" 3285 Sysctls: 3286 net.ipv4.ip_forward: "1" 3287 Ulimits: 3288 - {} 3289 VolumeDriver: "" 3290 ShmSize: 67108864 3291 HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" 3292 HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" 3293 LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" 3294 Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" 3295 Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" 3296 MountLabel: "" 3297 Name: "/boring_euclid" 3298 NetworkSettings: 3299 Bridge: "" 3300 SandboxID: "" 3301 HairpinMode: false 3302 LinkLocalIPv6Address: "" 3303 LinkLocalIPv6PrefixLen: 0 3304 SandboxKey: "" 3305 SecondaryIPAddresses: null 3306 SecondaryIPv6Addresses: null 3307 EndpointID: "" 3308 Gateway: "" 3309 GlobalIPv6Address: "" 3310 GlobalIPv6PrefixLen: 0 3311 IPAddress: "" 3312 IPPrefixLen: 0 3313 IPv6Gateway: "" 3314 MacAddress: "" 3315 Networks: 3316 bridge: 3317 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 3318 EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" 3319 Gateway: "172.17.0.1" 3320 IPAddress: "172.17.0.2" 3321 IPPrefixLen: 16 3322 IPv6Gateway: "" 3323 GlobalIPv6Address: "" 3324 GlobalIPv6PrefixLen: 0 3325 MacAddress: "02:42:ac:12:00:02" 3326 Path: "/bin/sh" 3327 ProcessLabel: "" 3328 ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" 3329 RestartCount: 1 3330 State: 3331 Error: "" 3332 ExitCode: 9 3333 FinishedAt: "2015-01-06T15:47:32.080254511Z" 3334 OOMKilled: false 3335 Dead: false 3336 Paused: false 3337 Pid: 0 3338 Restarting: false 3339 Running: true 3340 StartedAt: "2015-01-06T15:47:32.072697474Z" 3341 Status: "running" 3342 Mounts: 3343 - Name: "fac362...80535" 3344 Source: "/data" 3345 Destination: "/data" 3346 Driver: "local" 3347 Mode: "ro,Z" 3348 RW: false 3349 Propagation: "" 3350 404: 3351 description: "no such container" 3352 schema: 3353 $ref: "#/definitions/ErrorResponse" 3354 examples: 3355 application/json: 3356 message: "No such container: c2ada9df5af8" 3357 500: 3358 description: "server error" 3359 schema: 3360 $ref: "#/definitions/ErrorResponse" 3361 parameters: 3362 - name: "id" 3363 in: "path" 3364 required: true 3365 description: "ID or name of the container" 3366 type: "string" 3367 - name: "size" 3368 in: "query" 3369 type: "boolean" 3370 default: false 3371 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" 3372 tags: ["Container"] 3373 /containers/{id}/top: 3374 get: 3375 summary: "List processes running inside a container" 3376 description: "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows." 3377 operationId: "ContainerTop" 3378 responses: 3379 200: 3380 description: "no error" 3381 schema: 3382 type: "object" 3383 properties: 3384 Titles: 3385 description: "The ps column titles" 3386 type: "array" 3387 items: 3388 type: "string" 3389 Processes: 3390 description: "Each process running in the container, where each is process is an array of values corresponding to the titles" 3391 type: "array" 3392 items: 3393 type: "array" 3394 items: 3395 type: "string" 3396 examples: 3397 application/json: 3398 Titles: 3399 - "UID" 3400 - "PID" 3401 - "PPID" 3402 - "C" 3403 - "STIME" 3404 - "TTY" 3405 - "TIME" 3406 - "CMD" 3407 Processes: 3408 - 3409 - "root" 3410 - "13642" 3411 - "882" 3412 - "0" 3413 - "17:03" 3414 - "pts/0" 3415 - "00:00:00" 3416 - "/bin/bash" 3417 - 3418 - "root" 3419 - "13735" 3420 - "13642" 3421 - "0" 3422 - "17:06" 3423 - "pts/0" 3424 - "00:00:00" 3425 - "sleep 10" 3426 404: 3427 description: "no such container" 3428 schema: 3429 $ref: "#/definitions/ErrorResponse" 3430 examples: 3431 application/json: 3432 message: "No such container: c2ada9df5af8" 3433 500: 3434 description: "server error" 3435 schema: 3436 $ref: "#/definitions/ErrorResponse" 3437 parameters: 3438 - name: "id" 3439 in: "path" 3440 required: true 3441 description: "ID or name of the container" 3442 type: "string" 3443 - name: "ps_args" 3444 in: "query" 3445 description: "The arguments to pass to `ps`. For example, `aux`" 3446 type: "string" 3447 default: "-ef" 3448 tags: ["Container"] 3449 /containers/{id}/logs: 3450 get: 3451 summary: "Get container logs" 3452 description: | 3453 Get `stdout` and `stderr` logs from a container. 3454 3455 Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. 3456 operationId: "ContainerLogs" 3457 responses: 3458 101: 3459 description: "logs returned as a stream" 3460 schema: 3461 type: "string" 3462 format: "binary" 3463 200: 3464 description: "logs returned as a string in response body" 3465 schema: 3466 type: "string" 3467 404: 3468 description: "no such container" 3469 schema: 3470 $ref: "#/definitions/ErrorResponse" 3471 examples: 3472 application/json: 3473 message: "No such container: c2ada9df5af8" 3474 500: 3475 description: "server error" 3476 schema: 3477 $ref: "#/definitions/ErrorResponse" 3478 parameters: 3479 - name: "id" 3480 in: "path" 3481 required: true 3482 description: "ID or name of the container" 3483 type: "string" 3484 - name: "follow" 3485 in: "query" 3486 description: | 3487 Return the logs as a stream. 3488 3489 This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). 3490 type: "boolean" 3491 default: false 3492 - name: "stdout" 3493 in: "query" 3494 description: "Return logs from `stdout`" 3495 type: "boolean" 3496 default: false 3497 - name: "stderr" 3498 in: "query" 3499 description: "Return logs from `stderr`" 3500 type: "boolean" 3501 default: false 3502 - name: "since" 3503 in: "query" 3504 description: "Only return logs since this time, as a UNIX timestamp" 3505 type: "integer" 3506 default: 0 3507 - name: "timestamps" 3508 in: "query" 3509 description: "Add timestamps to every log line" 3510 type: "boolean" 3511 default: false 3512 - name: "tail" 3513 in: "query" 3514 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." 3515 type: "string" 3516 default: "all" 3517 tags: ["Container"] 3518 /containers/{id}/changes: 3519 get: 3520 summary: "Get changes on a container’s filesystem" 3521 description: | 3522 Returns which files in a container's filesystem have been added, deleted, 3523 or modified. The `Kind` of modification can be one of: 3524 3525 - `0`: Modified 3526 - `1`: Added 3527 - `2`: Deleted 3528 operationId: "ContainerChanges" 3529 produces: ["application/json"] 3530 responses: 3531 200: 3532 description: "The list of changes" 3533 schema: 3534 type: "array" 3535 items: 3536 type: "object" 3537 x-go-name: "ContainerChangeResponseItem" 3538 required: [Path, Kind] 3539 properties: 3540 Path: 3541 description: "Path to file that has changed" 3542 type: "string" 3543 x-nullable: false 3544 Kind: 3545 description: "Kind of change" 3546 type: "integer" 3547 format: "uint8" 3548 enum: [0, 1, 2] 3549 x-nullable: false 3550 examples: 3551 application/json: 3552 - Path: "/dev" 3553 Kind: 0 3554 - Path: "/dev/kmsg" 3555 Kind: 1 3556 - Path: "/test" 3557 Kind: 1 3558 404: 3559 description: "no such container" 3560 schema: 3561 $ref: "#/definitions/ErrorResponse" 3562 examples: 3563 application/json: 3564 message: "No such container: c2ada9df5af8" 3565 500: 3566 description: "server error" 3567 schema: 3568 $ref: "#/definitions/ErrorResponse" 3569 parameters: 3570 - name: "id" 3571 in: "path" 3572 required: true 3573 description: "ID or name of the container" 3574 type: "string" 3575 tags: ["Container"] 3576 /containers/{id}/export: 3577 get: 3578 summary: "Export a container" 3579 description: "Export the contents of a container as a tarball." 3580 operationId: "ContainerExport" 3581 produces: 3582 - "application/octet-stream" 3583 responses: 3584 200: 3585 description: "no error" 3586 404: 3587 description: "no such container" 3588 schema: 3589 $ref: "#/definitions/ErrorResponse" 3590 examples: 3591 application/json: 3592 message: "No such container: c2ada9df5af8" 3593 500: 3594 description: "server error" 3595 schema: 3596 $ref: "#/definitions/ErrorResponse" 3597 parameters: 3598 - name: "id" 3599 in: "path" 3600 required: true 3601 description: "ID or name of the container" 3602 type: "string" 3603 tags: ["Container"] 3604 /containers/{id}/stats: 3605 get: 3606 summary: "Get container stats based on resource usage" 3607 description: | 3608 This endpoint returns a live stream of a container’s resource usage 3609 statistics. 3610 3611 The `precpu_stats` is the CPU statistic of last read, which is used 3612 for calculating the CPU usage percentage. It is not the same as the 3613 `cpu_stats` field. 3614 3615 If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is 3616 nil then for compatibility with older daemons the length of the 3617 corresponding `cpu_usage.percpu_usage` array should be used. 3618 operationId: "ContainerStats" 3619 produces: ["application/json"] 3620 responses: 3621 200: 3622 description: "no error" 3623 schema: 3624 type: "object" 3625 examples: 3626 application/json: 3627 read: "2015-01-08T22:57:31.547920715Z" 3628 pids_stats: 3629 current: 3 3630 networks: 3631 eth0: 3632 rx_bytes: 5338 3633 rx_dropped: 0 3634 rx_errors: 0 3635 rx_packets: 36 3636 tx_bytes: 648 3637 tx_dropped: 0 3638 tx_errors: 0 3639 tx_packets: 8 3640 eth5: 3641 rx_bytes: 4641 3642 rx_dropped: 0 3643 rx_errors: 0 3644 rx_packets: 26 3645 tx_bytes: 690 3646 tx_dropped: 0 3647 tx_errors: 0 3648 tx_packets: 9 3649 memory_stats: 3650 stats: 3651 total_pgmajfault: 0 3652 cache: 0 3653 mapped_file: 0 3654 total_inactive_file: 0 3655 pgpgout: 414 3656 rss: 6537216 3657 total_mapped_file: 0 3658 writeback: 0 3659 unevictable: 0 3660 pgpgin: 477 3661 total_unevictable: 0 3662 pgmajfault: 0 3663 total_rss: 6537216 3664 total_rss_huge: 6291456 3665 total_writeback: 0 3666 total_inactive_anon: 0 3667 rss_huge: 6291456 3668 hierarchical_memory_limit: 67108864 3669 total_pgfault: 964 3670 total_active_file: 0 3671 active_anon: 6537216 3672 total_active_anon: 6537216 3673 total_pgpgout: 414 3674 total_cache: 0 3675 inactive_anon: 0 3676 active_file: 0 3677 pgfault: 964 3678 inactive_file: 0 3679 total_pgpgin: 477 3680 max_usage: 6651904 3681 usage: 6537216 3682 failcnt: 0 3683 limit: 67108864 3684 blkio_stats: {} 3685 cpu_stats: 3686 cpu_usage: 3687 percpu_usage: 3688 - 8646879 3689 - 24472255 3690 - 36438778 3691 - 30657443 3692 usage_in_usermode: 50000000 3693 total_usage: 100215355 3694 usage_in_kernelmode: 30000000 3695 system_cpu_usage: 739306590000000 3696 online_cpus: 4 3697 throttling_data: 3698 periods: 0 3699 throttled_periods: 0 3700 throttled_time: 0 3701 precpu_stats: 3702 cpu_usage: 3703 percpu_usage: 3704 - 8646879 3705 - 24350896 3706 - 36438778 3707 - 30657443 3708 usage_in_usermode: 50000000 3709 total_usage: 100093996 3710 usage_in_kernelmode: 30000000 3711 system_cpu_usage: 9492140000000 3712 online_cpus: 4 3713 throttling_data: 3714 periods: 0 3715 throttled_periods: 0 3716 throttled_time: 0 3717 404: 3718 description: "no such container" 3719 schema: 3720 $ref: "#/definitions/ErrorResponse" 3721 examples: 3722 application/json: 3723 message: "No such container: c2ada9df5af8" 3724 500: 3725 description: "server error" 3726 schema: 3727 $ref: "#/definitions/ErrorResponse" 3728 parameters: 3729 - name: "id" 3730 in: "path" 3731 required: true 3732 description: "ID or name of the container" 3733 type: "string" 3734 - name: "stream" 3735 in: "query" 3736 description: "Stream the output. If false, the stats will be output once and then it will disconnect." 3737 type: "boolean" 3738 default: true 3739 tags: ["Container"] 3740 /containers/{id}/resize: 3741 post: 3742 summary: "Resize a container TTY" 3743 description: "Resize the TTY for a container. You must restart the container for the resize to take effect." 3744 operationId: "ContainerResize" 3745 consumes: 3746 - "application/octet-stream" 3747 produces: 3748 - "text/plain" 3749 responses: 3750 200: 3751 description: "no error" 3752 404: 3753 description: "no such container" 3754 schema: 3755 $ref: "#/definitions/ErrorResponse" 3756 examples: 3757 application/json: 3758 message: "No such container: c2ada9df5af8" 3759 500: 3760 description: "cannot resize container" 3761 schema: 3762 $ref: "#/definitions/ErrorResponse" 3763 parameters: 3764 - name: "id" 3765 in: "path" 3766 required: true 3767 description: "ID or name of the container" 3768 type: "string" 3769 - name: "h" 3770 in: "query" 3771 description: "Height of the tty session in characters" 3772 type: "integer" 3773 - name: "w" 3774 in: "query" 3775 description: "Width of the tty session in characters" 3776 type: "integer" 3777 tags: ["Container"] 3778 /containers/{id}/start: 3779 post: 3780 summary: "Start a container" 3781 operationId: "ContainerStart" 3782 responses: 3783 204: 3784 description: "no error" 3785 304: 3786 description: "container already started" 3787 schema: 3788 $ref: "#/definitions/ErrorResponse" 3789 404: 3790 description: "no such container" 3791 schema: 3792 $ref: "#/definitions/ErrorResponse" 3793 examples: 3794 application/json: 3795 message: "No such container: c2ada9df5af8" 3796 500: 3797 description: "server error" 3798 schema: 3799 $ref: "#/definitions/ErrorResponse" 3800 parameters: 3801 - name: "id" 3802 in: "path" 3803 required: true 3804 description: "ID or name of the container" 3805 type: "string" 3806 - name: "detachKeys" 3807 in: "query" 3808 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 `_`." 3809 type: "string" 3810 tags: ["Container"] 3811 /containers/{id}/stop: 3812 post: 3813 summary: "Stop a container" 3814 operationId: "ContainerStop" 3815 responses: 3816 204: 3817 description: "no error" 3818 304: 3819 description: "container already stopped" 3820 schema: 3821 $ref: "#/definitions/ErrorResponse" 3822 404: 3823 description: "no such container" 3824 schema: 3825 $ref: "#/definitions/ErrorResponse" 3826 examples: 3827 application/json: 3828 message: "No such container: c2ada9df5af8" 3829 500: 3830 description: "server error" 3831 schema: 3832 $ref: "#/definitions/ErrorResponse" 3833 parameters: 3834 - name: "id" 3835 in: "path" 3836 required: true 3837 description: "ID or name of the container" 3838 type: "string" 3839 - name: "t" 3840 in: "query" 3841 description: "Number of seconds to wait before killing the container" 3842 type: "integer" 3843 tags: ["Container"] 3844 /containers/{id}/restart: 3845 post: 3846 summary: "Restart a container" 3847 operationId: "ContainerRestart" 3848 responses: 3849 204: 3850 description: "no error" 3851 404: 3852 description: "no such container" 3853 schema: 3854 $ref: "#/definitions/ErrorResponse" 3855 examples: 3856 application/json: 3857 message: "No such container: c2ada9df5af8" 3858 500: 3859 description: "server error" 3860 schema: 3861 $ref: "#/definitions/ErrorResponse" 3862 parameters: 3863 - name: "id" 3864 in: "path" 3865 required: true 3866 description: "ID or name of the container" 3867 type: "string" 3868 - name: "t" 3869 in: "query" 3870 description: "Number of seconds to wait before killing the container" 3871 type: "integer" 3872 tags: ["Container"] 3873 /containers/{id}/kill: 3874 post: 3875 summary: "Kill a container" 3876 description: "Send a POSIX signal to a container, defaulting to killing to the container." 3877 operationId: "ContainerKill" 3878 responses: 3879 204: 3880 description: "no error" 3881 404: 3882 description: "no such container" 3883 schema: 3884 $ref: "#/definitions/ErrorResponse" 3885 examples: 3886 application/json: 3887 message: "No such container: c2ada9df5af8" 3888 500: 3889 description: "server error" 3890 schema: 3891 $ref: "#/definitions/ErrorResponse" 3892 parameters: 3893 - name: "id" 3894 in: "path" 3895 required: true 3896 description: "ID or name of the container" 3897 type: "string" 3898 - name: "signal" 3899 in: "query" 3900 description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)" 3901 type: "string" 3902 default: "SIGKILL" 3903 tags: ["Container"] 3904 /containers/{id}/update: 3905 post: 3906 summary: "Update a container" 3907 description: "Change various configuration options of a container without having to recreate it." 3908 operationId: "ContainerUpdate" 3909 consumes: ["application/json"] 3910 produces: ["application/json"] 3911 responses: 3912 200: 3913 description: "The container has been updated." 3914 schema: 3915 type: "object" 3916 properties: 3917 Warnings: 3918 type: "array" 3919 items: 3920 type: "string" 3921 404: 3922 description: "no such container" 3923 schema: 3924 $ref: "#/definitions/ErrorResponse" 3925 examples: 3926 application/json: 3927 message: "No such container: c2ada9df5af8" 3928 500: 3929 description: "server error" 3930 schema: 3931 $ref: "#/definitions/ErrorResponse" 3932 parameters: 3933 - name: "id" 3934 in: "path" 3935 required: true 3936 description: "ID or name of the container" 3937 type: "string" 3938 - name: "update" 3939 in: "body" 3940 required: true 3941 schema: 3942 allOf: 3943 - $ref: "#/definitions/Resources" 3944 - type: "object" 3945 properties: 3946 RestartPolicy: 3947 $ref: "#/definitions/RestartPolicy" 3948 example: 3949 BlkioWeight: 300 3950 CpuShares: 512 3951 CpuPeriod: 100000 3952 CpuQuota: 50000 3953 CpuRealtimePeriod: 1000000 3954 CpuRealtimeRuntime: 10000 3955 CpusetCpus: "0,1" 3956 CpusetMems: "0" 3957 Memory: 314572800 3958 MemorySwap: 514288000 3959 MemoryReservation: 209715200 3960 KernelMemory: 52428800 3961 RestartPolicy: 3962 MaximumRetryCount: 4 3963 Name: "on-failure" 3964 tags: ["Container"] 3965 /containers/{id}/rename: 3966 post: 3967 summary: "Rename a container" 3968 operationId: "ContainerRename" 3969 responses: 3970 204: 3971 description: "no error" 3972 404: 3973 description: "no such container" 3974 schema: 3975 $ref: "#/definitions/ErrorResponse" 3976 examples: 3977 application/json: 3978 message: "No such container: c2ada9df5af8" 3979 409: 3980 description: "name already in use" 3981 schema: 3982 $ref: "#/definitions/ErrorResponse" 3983 500: 3984 description: "server error" 3985 schema: 3986 $ref: "#/definitions/ErrorResponse" 3987 parameters: 3988 - name: "id" 3989 in: "path" 3990 required: true 3991 description: "ID or name of the container" 3992 type: "string" 3993 - name: "name" 3994 in: "query" 3995 required: true 3996 description: "New name for the container" 3997 type: "string" 3998 tags: ["Container"] 3999 /containers/{id}/pause: 4000 post: 4001 summary: "Pause a container" 4002 description: | 4003 Use the cgroups freezer to suspend all processes in a container. 4004 4005 Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. 4006 operationId: "ContainerPause" 4007 responses: 4008 204: 4009 description: "no error" 4010 404: 4011 description: "no such container" 4012 schema: 4013 $ref: "#/definitions/ErrorResponse" 4014 examples: 4015 application/json: 4016 message: "No such container: c2ada9df5af8" 4017 500: 4018 description: "server error" 4019 schema: 4020 $ref: "#/definitions/ErrorResponse" 4021 parameters: 4022 - name: "id" 4023 in: "path" 4024 required: true 4025 description: "ID or name of the container" 4026 type: "string" 4027 tags: ["Container"] 4028 /containers/{id}/unpause: 4029 post: 4030 summary: "Unpause a container" 4031 description: "Resume a container which has been paused." 4032 operationId: "ContainerUnpause" 4033 responses: 4034 204: 4035 description: "no error" 4036 404: 4037 description: "no such container" 4038 schema: 4039 $ref: "#/definitions/ErrorResponse" 4040 examples: 4041 application/json: 4042 message: "No such container: c2ada9df5af8" 4043 500: 4044 description: "server error" 4045 schema: 4046 $ref: "#/definitions/ErrorResponse" 4047 parameters: 4048 - name: "id" 4049 in: "path" 4050 required: true 4051 description: "ID or name of the container" 4052 type: "string" 4053 tags: ["Container"] 4054 /containers/{id}/attach: 4055 post: 4056 summary: "Attach to a container" 4057 description: | 4058 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. 4059 4060 Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. 4061 4062 See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. 4063 4064 ### Hijacking 4065 4066 This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. 4067 4068 This is the response from the daemon for an attach request: 4069 4070 ``` 4071 HTTP/1.1 200 OK 4072 Content-Type: application/vnd.docker.raw-stream 4073 4074 [STREAM] 4075 ``` 4076 4077 After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. 4078 4079 To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. 4080 4081 For example, the client sends this request to upgrade the connection: 4082 4083 ``` 4084 POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 4085 Upgrade: tcp 4086 Connection: Upgrade 4087 ``` 4088 4089 The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: 4090 4091 ``` 4092 HTTP/1.1 101 UPGRADED 4093 Content-Type: application/vnd.docker.raw-stream 4094 Connection: Upgrade 4095 Upgrade: tcp 4096 4097 [STREAM] 4098 ``` 4099 4100 ### Stream format 4101 4102 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. 4103 4104 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`). 4105 4106 It is encoded on the first eight bytes like this: 4107 4108 ```go 4109 header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} 4110 ``` 4111 4112 `STREAM_TYPE` can be: 4113 4114 - 0: `stdin` (is written on `stdout`) 4115 - 1: `stdout` 4116 - 2: `stderr` 4117 4118 `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. 4119 4120 Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. 4121 4122 The simplest way to implement this protocol is the following: 4123 4124 1. Read 8 bytes. 4125 2. Choose `stdout` or `stderr` depending on the first byte. 4126 3. Extract the frame size from the last four bytes. 4127 4. Read the extracted size and output it on the correct output. 4128 5. Goto 1. 4129 4130 ### Stream format when using a TTY 4131 4132 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`. 4133 4134 operationId: "ContainerAttach" 4135 produces: 4136 - "application/vnd.docker.raw-stream" 4137 responses: 4138 101: 4139 description: "no error, hints proxy about hijacking" 4140 200: 4141 description: "no error, no upgrade header found" 4142 400: 4143 description: "bad parameter" 4144 schema: 4145 $ref: "#/definitions/ErrorResponse" 4146 404: 4147 description: "no such container" 4148 schema: 4149 $ref: "#/definitions/ErrorResponse" 4150 examples: 4151 application/json: 4152 message: "No such container: c2ada9df5af8" 4153 500: 4154 description: "server error" 4155 schema: 4156 $ref: "#/definitions/ErrorResponse" 4157 parameters: 4158 - name: "id" 4159 in: "path" 4160 required: true 4161 description: "ID or name of the container" 4162 type: "string" 4163 - name: "detachKeys" 4164 in: "query" 4165 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 `_`." 4166 type: "string" 4167 - name: "logs" 4168 in: "query" 4169 description: | 4170 Replay previous logs from the container. 4171 4172 This is useful for attaching to a container that has started and you want to output everything since the container started. 4173 4174 If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. 4175 type: "boolean" 4176 default: false 4177 - name: "stream" 4178 in: "query" 4179 description: "Stream attached streams from the time the request was made onwards" 4180 type: "boolean" 4181 default: false 4182 - name: "stdin" 4183 in: "query" 4184 description: "Attach to `stdin`" 4185 type: "boolean" 4186 default: false 4187 - name: "stdout" 4188 in: "query" 4189 description: "Attach to `stdout`" 4190 type: "boolean" 4191 default: false 4192 - name: "stderr" 4193 in: "query" 4194 description: "Attach to `stderr`" 4195 type: "boolean" 4196 default: false 4197 tags: ["Container"] 4198 /containers/{id}/attach/ws: 4199 get: 4200 summary: "Attach to a container via a websocket" 4201 operationId: "ContainerAttachWebsocket" 4202 responses: 4203 101: 4204 description: "no error, hints proxy about hijacking" 4205 200: 4206 description: "no error, no upgrade header found" 4207 400: 4208 description: "bad parameter" 4209 schema: 4210 $ref: "#/definitions/ErrorResponse" 4211 404: 4212 description: "no such container" 4213 schema: 4214 $ref: "#/definitions/ErrorResponse" 4215 examples: 4216 application/json: 4217 message: "No such container: c2ada9df5af8" 4218 500: 4219 description: "server error" 4220 schema: 4221 $ref: "#/definitions/ErrorResponse" 4222 parameters: 4223 - name: "id" 4224 in: "path" 4225 required: true 4226 description: "ID or name of the container" 4227 type: "string" 4228 - name: "detachKeys" 4229 in: "query" 4230 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 `_`." 4231 type: "string" 4232 - name: "logs" 4233 in: "query" 4234 description: "Return logs" 4235 type: "boolean" 4236 default: false 4237 - name: "stream" 4238 in: "query" 4239 description: "Return stream" 4240 type: "boolean" 4241 default: false 4242 - name: "stdin" 4243 in: "query" 4244 description: "Attach to `stdin`" 4245 type: "boolean" 4246 default: false 4247 - name: "stdout" 4248 in: "query" 4249 description: "Attach to `stdout`" 4250 type: "boolean" 4251 default: false 4252 - name: "stderr" 4253 in: "query" 4254 description: "Attach to `stderr`" 4255 type: "boolean" 4256 default: false 4257 tags: ["Container"] 4258 /containers/{id}/wait: 4259 post: 4260 summary: "Wait for a container" 4261 description: "Block until a container stops, then returns the exit code." 4262 operationId: "ContainerWait" 4263 produces: ["application/json"] 4264 responses: 4265 200: 4266 description: "The container has exit." 4267 schema: 4268 type: "object" 4269 required: [StatusCode] 4270 properties: 4271 StatusCode: 4272 description: "Exit code of the container" 4273 type: "integer" 4274 x-nullable: false 4275 404: 4276 description: "no such container" 4277 schema: 4278 $ref: "#/definitions/ErrorResponse" 4279 examples: 4280 application/json: 4281 message: "No such container: c2ada9df5af8" 4282 500: 4283 description: "server error" 4284 schema: 4285 $ref: "#/definitions/ErrorResponse" 4286 parameters: 4287 - name: "id" 4288 in: "path" 4289 required: true 4290 description: "ID or name of the container" 4291 type: "string" 4292 - name: "condition" 4293 in: "query" 4294 description: "Wait until a container state reaches the given condition, either 'not-running' (default), 'next-exit', or 'removed'." 4295 type: "string" 4296 default: "not-running" 4297 tags: ["Container"] 4298 /containers/{id}: 4299 delete: 4300 summary: "Remove a container" 4301 operationId: "ContainerDelete" 4302 responses: 4303 204: 4304 description: "no error" 4305 400: 4306 description: "bad parameter" 4307 schema: 4308 $ref: "#/definitions/ErrorResponse" 4309 404: 4310 description: "no such container" 4311 schema: 4312 $ref: "#/definitions/ErrorResponse" 4313 examples: 4314 application/json: 4315 message: "No such container: c2ada9df5af8" 4316 409: 4317 description: "conflict" 4318 schema: 4319 $ref: "#/definitions/ErrorResponse" 4320 examples: 4321 application/json: 4322 message: "You cannot remove a running container: c2ada9df5af8. Stop the container before attempting removal or force remove" 4323 500: 4324 description: "server error" 4325 schema: 4326 $ref: "#/definitions/ErrorResponse" 4327 parameters: 4328 - name: "id" 4329 in: "path" 4330 required: true 4331 description: "ID or name of the container" 4332 type: "string" 4333 - name: "v" 4334 in: "query" 4335 description: "Remove the volumes associated with the container." 4336 type: "boolean" 4337 default: false 4338 - name: "force" 4339 in: "query" 4340 description: "If the container is running, kill it before removing it." 4341 type: "boolean" 4342 default: false 4343 - name: "link" 4344 in: "query" 4345 description: "Remove the specified link associated with the container." 4346 type: "boolean" 4347 default: false 4348 tags: ["Container"] 4349 /containers/{id}/archive: 4350 head: 4351 summary: "Get information about files in a container" 4352 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." 4353 operationId: "ContainerArchiveInfo" 4354 responses: 4355 200: 4356 description: "no error" 4357 headers: 4358 X-Docker-Container-Path-Stat: 4359 type: "string" 4360 description: "TODO" 4361 400: 4362 description: "Bad parameter" 4363 schema: 4364 allOf: 4365 - $ref: "#/definitions/ErrorResponse" 4366 - type: "object" 4367 properties: 4368 message: 4369 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)." 4370 type: "string" 4371 x-nullable: false 4372 404: 4373 description: "Container or path does not exist" 4374 schema: 4375 $ref: "#/definitions/ErrorResponse" 4376 examples: 4377 application/json: 4378 message: "No such container: c2ada9df5af8" 4379 500: 4380 description: "Server error" 4381 schema: 4382 $ref: "#/definitions/ErrorResponse" 4383 parameters: 4384 - name: "id" 4385 in: "path" 4386 required: true 4387 description: "ID or name of the container" 4388 type: "string" 4389 - name: "path" 4390 in: "query" 4391 required: true 4392 description: "Resource in the container’s filesystem to archive." 4393 type: "string" 4394 tags: ["Container"] 4395 get: 4396 summary: "Get an archive of a filesystem resource in a container" 4397 description: "Get a tar archive of a resource in the filesystem of container id." 4398 operationId: "ContainerArchive" 4399 produces: ["application/x-tar"] 4400 responses: 4401 200: 4402 description: "no error" 4403 400: 4404 description: "Bad parameter" 4405 schema: 4406 allOf: 4407 - $ref: "#/definitions/ErrorResponse" 4408 - type: "object" 4409 properties: 4410 message: 4411 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)." 4412 type: "string" 4413 x-nullable: false 4414 404: 4415 description: "Container or path does not exist" 4416 schema: 4417 $ref: "#/definitions/ErrorResponse" 4418 examples: 4419 application/json: 4420 message: "No such container: c2ada9df5af8" 4421 500: 4422 description: "server error" 4423 schema: 4424 $ref: "#/definitions/ErrorResponse" 4425 parameters: 4426 - name: "id" 4427 in: "path" 4428 required: true 4429 description: "ID or name of the container" 4430 type: "string" 4431 - name: "path" 4432 in: "query" 4433 required: true 4434 description: "Resource in the container’s filesystem to archive." 4435 type: "string" 4436 tags: ["Container"] 4437 put: 4438 summary: "Extract an archive of files or folders to a directory in a container" 4439 description: "Upload a tar archive to be extracted to a path in the filesystem of container id." 4440 operationId: "PutContainerArchive" 4441 consumes: ["application/x-tar", "application/octet-stream"] 4442 responses: 4443 200: 4444 description: "The content was extracted successfully" 4445 400: 4446 description: "Bad parameter" 4447 schema: 4448 $ref: "#/definitions/ErrorResponse" 4449 403: 4450 description: "Permission denied, the volume or container rootfs is marked as read-only." 4451 schema: 4452 $ref: "#/definitions/ErrorResponse" 4453 404: 4454 description: "No such container or path does not exist inside the container" 4455 schema: 4456 $ref: "#/definitions/ErrorResponse" 4457 examples: 4458 application/json: 4459 message: "No such container: c2ada9df5af8" 4460 500: 4461 description: "Server error" 4462 schema: 4463 $ref: "#/definitions/ErrorResponse" 4464 parameters: 4465 - name: "id" 4466 in: "path" 4467 required: true 4468 description: "ID or name of the container" 4469 type: "string" 4470 - name: "path" 4471 in: "query" 4472 required: true 4473 description: "Path to a directory in the container to extract the archive’s contents into. " 4474 type: "string" 4475 - name: "noOverwriteDirNonDir" 4476 in: "query" 4477 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." 4478 type: "string" 4479 - name: "inputStream" 4480 in: "body" 4481 required: true 4482 description: "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." 4483 schema: 4484 type: "string" 4485 tags: ["Container"] 4486 /containers/prune: 4487 post: 4488 summary: "Delete stopped containers" 4489 produces: 4490 - "application/json" 4491 operationId: "ContainerPrune" 4492 parameters: 4493 - name: "filters" 4494 in: "query" 4495 description: | 4496 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 4497 4498 Available filters: 4499 - `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. 4500 - `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. 4501 type: "string" 4502 responses: 4503 200: 4504 description: "No error" 4505 schema: 4506 type: "object" 4507 properties: 4508 ContainersDeleted: 4509 description: "Container IDs that were deleted" 4510 type: "array" 4511 items: 4512 type: "string" 4513 SpaceReclaimed: 4514 description: "Disk space reclaimed in bytes" 4515 type: "integer" 4516 format: "int64" 4517 500: 4518 description: "Server error" 4519 schema: 4520 $ref: "#/definitions/ErrorResponse" 4521 tags: ["Container"] 4522 /images/json: 4523 get: 4524 summary: "List Images" 4525 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." 4526 operationId: "ImageList" 4527 produces: 4528 - "application/json" 4529 responses: 4530 200: 4531 description: "Summary image data for the images matching the query" 4532 schema: 4533 type: "array" 4534 items: 4535 $ref: "#/definitions/ImageSummary" 4536 examples: 4537 application/json: 4538 - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" 4539 ParentId: "" 4540 RepoTags: 4541 - "ubuntu:12.04" 4542 - "ubuntu:precise" 4543 RepoDigests: 4544 - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787" 4545 Created: 1474925151 4546 Size: 103579269 4547 VirtualSize: 103579269 4548 SharedSize: 0 4549 Labels: {} 4550 Containers: 2 4551 - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175" 4552 ParentId: "" 4553 RepoTags: 4554 - "ubuntu:12.10" 4555 - "ubuntu:quantal" 4556 RepoDigests: 4557 - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7" 4558 - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3" 4559 Created: 1403128455 4560 Size: 172064416 4561 VirtualSize: 172064416 4562 SharedSize: 0 4563 Labels: {} 4564 Containers: 5 4565 500: 4566 description: "server error" 4567 schema: 4568 $ref: "#/definitions/ErrorResponse" 4569 parameters: 4570 - name: "all" 4571 in: "query" 4572 description: "Show all images. Only images from a final layer (no children) are shown by default." 4573 type: "boolean" 4574 default: false 4575 - name: "filters" 4576 in: "query" 4577 description: | 4578 A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: 4579 4580 - `before`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 4581 - `dangling=true` 4582 - `label=key` or `label="key=value"` of an image label 4583 - `reference`=(`<image-name>[:<tag>]`) 4584 - `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) 4585 type: "string" 4586 - name: "digests" 4587 in: "query" 4588 description: "Show digest information as a `RepoDigests` field on each image." 4589 type: "boolean" 4590 default: false 4591 tags: ["Image"] 4592 /build: 4593 post: 4594 summary: "Build an image" 4595 description: | 4596 Build an image from a tar archive with a `Dockerfile` in it. 4597 4598 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/). 4599 4600 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. 4601 4602 The build is canceled if the client drops the connection by quitting or being killed. 4603 operationId: "ImageBuild" 4604 consumes: 4605 - "application/octet-stream" 4606 produces: 4607 - "application/json" 4608 parameters: 4609 - name: "inputStream" 4610 in: "body" 4611 description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." 4612 schema: 4613 type: "string" 4614 format: "binary" 4615 - name: "dockerfile" 4616 in: "query" 4617 description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." 4618 type: "string" 4619 default: "Dockerfile" 4620 - name: "t" 4621 in: "query" 4622 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." 4623 type: "string" 4624 - name: "extrahosts" 4625 in: "query" 4626 description: "Extra hosts to add to /etc/hosts" 4627 type: "string" 4628 - name: "remote" 4629 in: "query" 4630 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." 4631 type: "string" 4632 - name: "q" 4633 in: "query" 4634 description: "Suppress verbose build output." 4635 type: "boolean" 4636 default: false 4637 - name: "nocache" 4638 in: "query" 4639 description: "Do not use the cache when building the image." 4640 type: "boolean" 4641 default: false 4642 - name: "cachefrom" 4643 in: "query" 4644 description: "JSON array of images used for build cache resolution." 4645 type: "string" 4646 - name: "pull" 4647 in: "query" 4648 description: "Attempt to pull the image even if an older image exists locally." 4649 type: "string" 4650 - name: "rm" 4651 in: "query" 4652 description: "Remove intermediate containers after a successful build." 4653 type: "boolean" 4654 default: true 4655 - name: "forcerm" 4656 in: "query" 4657 description: "Always remove intermediate containers, even upon failure." 4658 type: "boolean" 4659 default: false 4660 - name: "memory" 4661 in: "query" 4662 description: "Set memory limit for build." 4663 type: "integer" 4664 - name: "memswap" 4665 in: "query" 4666 description: "Total memory (memory + swap). Set as `-1` to disable swap." 4667 type: "integer" 4668 - name: "cpushares" 4669 in: "query" 4670 description: "CPU shares (relative weight)." 4671 type: "integer" 4672 - name: "cpusetcpus" 4673 in: "query" 4674 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." 4675 type: "string" 4676 - name: "cpuperiod" 4677 in: "query" 4678 description: "The length of a CPU period in microseconds." 4679 type: "integer" 4680 - name: "cpuquota" 4681 in: "query" 4682 description: "Microseconds of CPU time that the container can get in a CPU period." 4683 type: "integer" 4684 - name: "buildargs" 4685 in: "query" 4686 description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)" 4687 type: "integer" 4688 - name: "shmsize" 4689 in: "query" 4690 description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." 4691 type: "integer" 4692 - name: "squash" 4693 in: "query" 4694 description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" 4695 type: "boolean" 4696 - name: "labels" 4697 in: "query" 4698 description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." 4699 type: "string" 4700 - name: "networkmode" 4701 in: "query" 4702 description: "Sets the networking mode for the run commands during 4703 build. Supported standard values are: `bridge`, `host`, `none`, and 4704 `container:<name|id>`. Any other value is taken as a custom network's 4705 name to which this container should connect to." 4706 type: "string" 4707 - name: "Content-type" 4708 in: "header" 4709 type: "string" 4710 enum: 4711 - "application/x-tar" 4712 default: "application/x-tar" 4713 - name: "X-Registry-Config" 4714 in: "header" 4715 description: | 4716 This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. 4717 4718 The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: 4719 4720 ``` 4721 { 4722 "docker.example.com": { 4723 "username": "janedoe", 4724 "password": "hunter2" 4725 }, 4726 "https://index.docker.io/v1/": { 4727 "username": "mobydock", 4728 "password": "conta1n3rize14" 4729 } 4730 } 4731 ``` 4732 4733 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. 4734 type: "string" 4735 responses: 4736 200: 4737 description: "no error" 4738 400: 4739 description: "Bad parameter" 4740 schema: 4741 $ref: "#/definitions/ErrorResponse" 4742 500: 4743 description: "server error" 4744 schema: 4745 $ref: "#/definitions/ErrorResponse" 4746 tags: ["Image"] 4747 /images/create: 4748 post: 4749 summary: "Create an image" 4750 description: "Create an image by either pulling it from a registry or importing it." 4751 operationId: "ImageCreate" 4752 consumes: 4753 - "text/plain" 4754 - "application/octet-stream" 4755 produces: 4756 - "application/json" 4757 responses: 4758 200: 4759 description: "no error" 4760 404: 4761 description: "repository does not exist or no read access" 4762 schema: 4763 $ref: "#/definitions/ErrorResponse" 4764 500: 4765 description: "server error" 4766 schema: 4767 $ref: "#/definitions/ErrorResponse" 4768 parameters: 4769 - name: "fromImage" 4770 in: "query" 4771 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." 4772 type: "string" 4773 - name: "fromSrc" 4774 in: "query" 4775 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." 4776 type: "string" 4777 - name: "repo" 4778 in: "query" 4779 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." 4780 type: "string" 4781 - name: "tag" 4782 in: "query" 4783 description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." 4784 type: "string" 4785 - name: "inputImage" 4786 in: "body" 4787 description: "Image content if the value `-` has been specified in fromSrc query parameter" 4788 schema: 4789 type: "string" 4790 required: false 4791 - name: "X-Registry-Auth" 4792 in: "header" 4793 description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" 4794 type: "string" 4795 tags: ["Image"] 4796 /images/{name}/json: 4797 get: 4798 summary: "Inspect an image" 4799 description: "Return low-level information about an image." 4800 operationId: "ImageInspect" 4801 produces: 4802 - "application/json" 4803 responses: 4804 200: 4805 description: "No error" 4806 schema: 4807 $ref: "#/definitions/Image" 4808 examples: 4809 application/json: 4810 Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" 4811 Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a" 4812 Comment: "" 4813 Os: "linux" 4814 Architecture: "amd64" 4815 Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" 4816 ContainerConfig: 4817 Tty: false 4818 Hostname: "e611e15f9c9d" 4819 Domainname: "" 4820 AttachStdout: false 4821 PublishService: "" 4822 AttachStdin: false 4823 OpenStdin: false 4824 StdinOnce: false 4825 NetworkDisabled: false 4826 OnBuild: [] 4827 Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" 4828 User: "" 4829 WorkingDir: "" 4830 MacAddress: "" 4831 AttachStderr: false 4832 Labels: 4833 com.example.license: "GPL" 4834 com.example.version: "1.0" 4835 com.example.vendor: "Acme" 4836 Env: 4837 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 4838 Cmd: 4839 - "/bin/sh" 4840 - "-c" 4841 - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0" 4842 DockerVersion: "1.9.0-dev" 4843 VirtualSize: 188359297 4844 Size: 0 4845 Author: "" 4846 Created: "2015-09-10T08:30:53.26995814Z" 4847 GraphDriver: 4848 Name: "aufs" 4849 Data: {} 4850 RepoDigests: 4851 - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf" 4852 RepoTags: 4853 - "example:1.0" 4854 - "example:latest" 4855 - "example:stable" 4856 Config: 4857 Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" 4858 NetworkDisabled: false 4859 OnBuild: [] 4860 StdinOnce: false 4861 PublishService: "" 4862 AttachStdin: false 4863 OpenStdin: false 4864 Domainname: "" 4865 AttachStdout: false 4866 Tty: false 4867 Hostname: "e611e15f9c9d" 4868 Cmd: 4869 - "/bin/bash" 4870 Env: 4871 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 4872 Labels: 4873 com.example.vendor: "Acme" 4874 com.example.version: "1.0" 4875 com.example.license: "GPL" 4876 MacAddress: "" 4877 AttachStderr: false 4878 WorkingDir: "" 4879 User: "" 4880 RootFS: 4881 Type: "layers" 4882 Layers: 4883 - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" 4884 - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" 4885 404: 4886 description: "No such image" 4887 schema: 4888 $ref: "#/definitions/ErrorResponse" 4889 examples: 4890 application/json: 4891 message: "No such image: someimage (tag: latest)" 4892 500: 4893 description: "Server error" 4894 schema: 4895 $ref: "#/definitions/ErrorResponse" 4896 parameters: 4897 - name: "name" 4898 in: "path" 4899 description: "Image name or id" 4900 type: "string" 4901 required: true 4902 tags: ["Image"] 4903 /images/{name}/history: 4904 get: 4905 summary: "Get the history of an image" 4906 description: "Return parent layers of an image." 4907 operationId: "ImageHistory" 4908 produces: ["application/json"] 4909 responses: 4910 200: 4911 description: "List of image layers" 4912 schema: 4913 type: "array" 4914 items: 4915 type: "object" 4916 x-go-name: HistoryResponseItem 4917 required: [Id, Created, CreatedBy, Tags, Size, Comment] 4918 properties: 4919 Id: 4920 type: "string" 4921 x-nullable: false 4922 Created: 4923 type: "integer" 4924 format: "int64" 4925 x-nullable: false 4926 CreatedBy: 4927 type: "string" 4928 x-nullable: false 4929 Tags: 4930 type: "array" 4931 items: 4932 type: "string" 4933 Size: 4934 type: "integer" 4935 format: "int64" 4936 x-nullable: false 4937 Comment: 4938 type: "string" 4939 x-nullable: false 4940 examples: 4941 application/json: 4942 - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" 4943 Created: 1398108230 4944 CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" 4945 Tags: 4946 - "ubuntu:lucid" 4947 - "ubuntu:10.04" 4948 Size: 182964289 4949 Comment: "" 4950 - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" 4951 Created: 1398108222 4952 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/" 4953 Tags: [] 4954 Size: 0 4955 Comment: "" 4956 - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" 4957 Created: 1371157430 4958 CreatedBy: "" 4959 Tags: 4960 - "scratch12:latest" 4961 - "scratch:latest" 4962 Size: 0 4963 Comment: "Imported from -" 4964 404: 4965 description: "No such image" 4966 schema: 4967 $ref: "#/definitions/ErrorResponse" 4968 500: 4969 description: "Server error" 4970 schema: 4971 $ref: "#/definitions/ErrorResponse" 4972 parameters: 4973 - name: "name" 4974 in: "path" 4975 description: "Image name or ID" 4976 type: "string" 4977 required: true 4978 tags: ["Image"] 4979 /images/{name}/push: 4980 post: 4981 summary: "Push an image" 4982 description: | 4983 Push an image to a registry. 4984 4985 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`. 4986 4987 The push is cancelled if the HTTP connection is closed. 4988 operationId: "ImagePush" 4989 consumes: 4990 - "application/octet-stream" 4991 responses: 4992 200: 4993 description: "No error" 4994 404: 4995 description: "No such image" 4996 schema: 4997 $ref: "#/definitions/ErrorResponse" 4998 500: 4999 description: "Server error" 5000 schema: 5001 $ref: "#/definitions/ErrorResponse" 5002 parameters: 5003 - name: "name" 5004 in: "path" 5005 description: "Image name or ID." 5006 type: "string" 5007 required: true 5008 - name: "tag" 5009 in: "query" 5010 description: "The tag to associate with the image on the registry." 5011 type: "string" 5012 - name: "X-Registry-Auth" 5013 in: "header" 5014 description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" 5015 type: "string" 5016 required: true 5017 tags: ["Image"] 5018 /images/{name}/tag: 5019 post: 5020 summary: "Tag an image" 5021 description: "Tag an image so that it becomes part of a repository." 5022 operationId: "ImageTag" 5023 responses: 5024 201: 5025 description: "No error" 5026 400: 5027 description: "Bad parameter" 5028 schema: 5029 $ref: "#/definitions/ErrorResponse" 5030 404: 5031 description: "No such image" 5032 schema: 5033 $ref: "#/definitions/ErrorResponse" 5034 409: 5035 description: "Conflict" 5036 schema: 5037 $ref: "#/definitions/ErrorResponse" 5038 500: 5039 description: "Server error" 5040 schema: 5041 $ref: "#/definitions/ErrorResponse" 5042 parameters: 5043 - name: "name" 5044 in: "path" 5045 description: "Image name or ID to tag." 5046 type: "string" 5047 required: true 5048 - name: "repo" 5049 in: "query" 5050 description: "The repository to tag in. For example, `someuser/someimage`." 5051 type: "string" 5052 - name: "tag" 5053 in: "query" 5054 description: "The name of the new tag." 5055 type: "string" 5056 tags: ["Image"] 5057 /images/{name}: 5058 delete: 5059 summary: "Remove an image" 5060 description: | 5061 Remove an image, along with any untagged parent images that were 5062 referenced by that image. 5063 5064 Images can't be removed if they have descendant images, are being 5065 used by a running container or are being used by a build. 5066 operationId: "ImageDelete" 5067 produces: ["application/json"] 5068 responses: 5069 200: 5070 description: "The image was deleted successfully" 5071 schema: 5072 type: "array" 5073 items: 5074 $ref: "#/definitions/ImageDeleteResponseItem" 5075 examples: 5076 application/json: 5077 - Untagged: "3e2f21a89f" 5078 - Deleted: "3e2f21a89f" 5079 - Deleted: "53b4f83ac9" 5080 404: 5081 description: "No such image" 5082 schema: 5083 $ref: "#/definitions/ErrorResponse" 5084 409: 5085 description: "Conflict" 5086 schema: 5087 $ref: "#/definitions/ErrorResponse" 5088 500: 5089 description: "Server error" 5090 schema: 5091 $ref: "#/definitions/ErrorResponse" 5092 parameters: 5093 - name: "name" 5094 in: "path" 5095 description: "Image name or ID" 5096 type: "string" 5097 required: true 5098 - name: "force" 5099 in: "query" 5100 description: "Remove the image even if it is being used by stopped containers or has other tags" 5101 type: "boolean" 5102 default: false 5103 - name: "noprune" 5104 in: "query" 5105 description: "Do not delete untagged parent images" 5106 type: "boolean" 5107 default: false 5108 tags: ["Image"] 5109 /images/search: 5110 get: 5111 summary: "Search images" 5112 description: "Search for an image on Docker Hub." 5113 operationId: "ImageSearch" 5114 produces: 5115 - "application/json" 5116 responses: 5117 200: 5118 description: "No error" 5119 schema: 5120 type: "array" 5121 items: 5122 type: "object" 5123 properties: 5124 description: 5125 type: "string" 5126 is_official: 5127 type: "boolean" 5128 is_automated: 5129 type: "boolean" 5130 name: 5131 type: "string" 5132 star_count: 5133 type: "integer" 5134 examples: 5135 application/json: 5136 - description: "" 5137 is_official: false 5138 is_automated: false 5139 name: "wma55/u1210sshd" 5140 star_count: 0 5141 - description: "" 5142 is_official: false 5143 is_automated: false 5144 name: "jdswinbank/sshd" 5145 star_count: 0 5146 - description: "" 5147 is_official: false 5148 is_automated: false 5149 name: "vgauthier/sshd" 5150 star_count: 0 5151 500: 5152 description: "Server error" 5153 schema: 5154 $ref: "#/definitions/ErrorResponse" 5155 parameters: 5156 - name: "term" 5157 in: "query" 5158 description: "Term to search" 5159 type: "string" 5160 required: true 5161 - name: "limit" 5162 in: "query" 5163 description: "Maximum number of results to return" 5164 type: "integer" 5165 - name: "filters" 5166 in: "query" 5167 description: | 5168 A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: 5169 5170 - `is-automated=(true|false)` 5171 - `is-official=(true|false)` 5172 - `stars=<number>` Matches images that has at least 'number' stars. 5173 type: "string" 5174 tags: ["Image"] 5175 /images/prune: 5176 post: 5177 summary: "Delete unused images" 5178 produces: 5179 - "application/json" 5180 operationId: "ImagePrune" 5181 parameters: 5182 - name: "filters" 5183 in: "query" 5184 description: | 5185 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: 5186 5187 - `dangling=<boolean>` When set to `true` (or `1`), prune only 5188 unused *and* untagged images. When set to `false` 5189 (or `0`), all unused images are pruned. 5190 - `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. 5191 - `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. 5192 type: "string" 5193 responses: 5194 200: 5195 description: "No error" 5196 schema: 5197 type: "object" 5198 properties: 5199 ImagesDeleted: 5200 description: "Images that were deleted" 5201 type: "array" 5202 items: 5203 $ref: "#/definitions/ImageDeleteResponseItem" 5204 SpaceReclaimed: 5205 description: "Disk space reclaimed in bytes" 5206 type: "integer" 5207 format: "int64" 5208 500: 5209 description: "Server error" 5210 schema: 5211 $ref: "#/definitions/ErrorResponse" 5212 tags: ["Image"] 5213 /auth: 5214 post: 5215 summary: "Check auth configuration" 5216 description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password." 5217 operationId: "SystemAuth" 5218 consumes: ["application/json"] 5219 produces: ["application/json"] 5220 responses: 5221 200: 5222 description: "An identity token was generated successfully." 5223 schema: 5224 type: "object" 5225 required: [Status] 5226 properties: 5227 Status: 5228 description: "The status of the authentication" 5229 type: "string" 5230 x-nullable: false 5231 IdentityToken: 5232 description: "An opaque token used to authenticate a user after a successful login" 5233 type: "string" 5234 x-nullable: false 5235 examples: 5236 application/json: 5237 Status: "Login Succeeded" 5238 IdentityToken: "9cbaf023786cd7..." 5239 204: 5240 description: "No error" 5241 500: 5242 description: "Server error" 5243 schema: 5244 $ref: "#/definitions/ErrorResponse" 5245 parameters: 5246 - name: "authConfig" 5247 in: "body" 5248 description: "Authentication to check" 5249 schema: 5250 $ref: "#/definitions/AuthConfig" 5251 tags: ["System"] 5252 /info: 5253 get: 5254 summary: "Get system information" 5255 operationId: "SystemInfo" 5256 produces: 5257 - "application/json" 5258 responses: 5259 200: 5260 description: "No error" 5261 schema: 5262 type: "object" 5263 properties: 5264 Architecture: 5265 type: "string" 5266 Containers: 5267 type: "integer" 5268 ContainersRunning: 5269 type: "integer" 5270 ContainersStopped: 5271 type: "integer" 5272 ContainersPaused: 5273 type: "integer" 5274 CpuCfsPeriod: 5275 type: "boolean" 5276 CpuCfsQuota: 5277 type: "boolean" 5278 Debug: 5279 type: "boolean" 5280 DiscoveryBackend: 5281 type: "string" 5282 DockerRootDir: 5283 type: "string" 5284 Driver: 5285 type: "string" 5286 DriverStatus: 5287 type: "array" 5288 items: 5289 type: "array" 5290 items: 5291 type: "string" 5292 SystemStatus: 5293 type: "array" 5294 items: 5295 type: "array" 5296 items: 5297 type: "string" 5298 Plugins: 5299 type: "object" 5300 properties: 5301 Volume: 5302 type: "array" 5303 items: 5304 type: "string" 5305 Network: 5306 type: "array" 5307 items: 5308 type: "string" 5309 Log: 5310 type: "array" 5311 items: 5312 type: "string" 5313 ExperimentalBuild: 5314 type: "boolean" 5315 HttpProxy: 5316 type: "string" 5317 HttpsProxy: 5318 type: "string" 5319 ID: 5320 type: "string" 5321 IPv4Forwarding: 5322 type: "boolean" 5323 Images: 5324 type: "integer" 5325 IndexServerAddress: 5326 type: "string" 5327 InitPath: 5328 type: "string" 5329 InitSha1: 5330 type: "string" 5331 KernelVersion: 5332 type: "string" 5333 Labels: 5334 type: "array" 5335 items: 5336 type: "string" 5337 MemTotal: 5338 type: "integer" 5339 MemoryLimit: 5340 type: "boolean" 5341 NCPU: 5342 type: "integer" 5343 NEventsListener: 5344 type: "integer" 5345 NFd: 5346 type: "integer" 5347 NGoroutines: 5348 type: "integer" 5349 Name: 5350 type: "string" 5351 NoProxy: 5352 type: "string" 5353 OomKillDisable: 5354 type: "boolean" 5355 OSType: 5356 type: "string" 5357 OomScoreAdj: 5358 type: "integer" 5359 OperatingSystem: 5360 type: "string" 5361 RegistryConfig: 5362 type: "object" 5363 properties: 5364 IndexConfigs: 5365 type: "object" 5366 additionalProperties: 5367 type: "object" 5368 properties: 5369 Mirrors: 5370 type: "array" 5371 items: 5372 type: "string" 5373 Name: 5374 type: "string" 5375 Official: 5376 type: "boolean" 5377 Secure: 5378 type: "boolean" 5379 InsecureRegistryCIDRs: 5380 type: "array" 5381 items: 5382 type: "string" 5383 SwapLimit: 5384 type: "boolean" 5385 SystemTime: 5386 type: "string" 5387 ServerVersion: 5388 type: "string" 5389 examples: 5390 application/json: 5391 Architecture: "x86_64" 5392 ClusterStore: "etcd://localhost:2379" 5393 CgroupDriver: "cgroupfs" 5394 Containers: 11 5395 ContainersRunning: 7 5396 ContainersStopped: 3 5397 ContainersPaused: 1 5398 CpuCfsPeriod: true 5399 CpuCfsQuota: true 5400 Debug: false 5401 DockerRootDir: "/var/lib/docker" 5402 Driver: "btrfs" 5403 DriverStatus: 5404 - 5405 - "" 5406 ExperimentalBuild: false 5407 HttpProxy: "http://test:test@localhost:8080" 5408 HttpsProxy: "https://test:test@localhost:8080" 5409 ID: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" 5410 IPv4Forwarding: true 5411 Images: 16 5412 IndexServerAddress: "https://index.docker.io/v1/" 5413 InitPath: "/usr/bin/docker" 5414 InitSha1: "" 5415 KernelMemory: true 5416 KernelVersion: "3.12.0-1-amd64" 5417 Labels: 5418 - "storage=ssd" 5419 MemTotal: 2099236864 5420 MemoryLimit: true 5421 NCPU: 1 5422 NEventsListener: 0 5423 NFd: 11 5424 NGoroutines: 21 5425 Name: "prod-server-42" 5426 NoProxy: "9.81.1.160" 5427 OomKillDisable: true 5428 OSType: "linux" 5429 OperatingSystem: "Boot2Docker" 5430 Plugins: 5431 Volume: 5432 - "local" 5433 Network: 5434 - "null" 5435 - "host" 5436 - "bridge" 5437 RegistryConfig: 5438 IndexConfigs: 5439 docker.io: 5440 Name: "docker.io" 5441 Official: true 5442 Secure: true 5443 InsecureRegistryCIDRs: 5444 - "127.0.0.0/8" 5445 SecurityOptions: 5446 - Key: "Name" 5447 Value: "seccomp" 5448 - Key: "Profile" 5449 Value: "default" 5450 - Key: "Name" 5451 Value: "apparmor" 5452 - Key: "Name" 5453 Value: "selinux" 5454 - Key: "Name" 5455 Value: "userns" 5456 ServerVersion: "1.9.0" 5457 SwapLimit: false 5458 SystemStatus: 5459 - 5460 - "State" 5461 - "Healthy" 5462 SystemTime: "2015-03-10T11:11:23.730591467-07:00" 5463 500: 5464 description: "Server error" 5465 schema: 5466 $ref: "#/definitions/ErrorResponse" 5467 tags: ["System"] 5468 /version: 5469 get: 5470 summary: "Get version" 5471 description: "Returns the version of Docker that is running and various information about the system that Docker is running on." 5472 operationId: "SystemVersion" 5473 produces: ["application/json"] 5474 responses: 5475 200: 5476 description: "no error" 5477 schema: 5478 type: "object" 5479 properties: 5480 Version: 5481 type: "string" 5482 ApiVersion: 5483 type: "string" 5484 MinAPIVersion: 5485 type: "string" 5486 GitCommit: 5487 type: "string" 5488 GoVersion: 5489 type: "string" 5490 Os: 5491 type: "string" 5492 Arch: 5493 type: "string" 5494 KernelVersion: 5495 type: "string" 5496 Experimental: 5497 type: "boolean" 5498 BuildTime: 5499 type: "string" 5500 examples: 5501 application/json: 5502 Version: "17.04.0" 5503 Os: "linux" 5504 KernelVersion: "3.19.0-23-generic" 5505 GoVersion: "go1.7.5" 5506 GitCommit: "deadbee" 5507 Arch: "amd64" 5508 ApiVersion: "1.27" 5509 MinAPIVersion: "1.12" 5510 BuildTime: "2016-06-14T07:09:13.444803460+00:00" 5511 Experimental: true 5512 500: 5513 description: "server error" 5514 schema: 5515 $ref: "#/definitions/ErrorResponse" 5516 tags: ["System"] 5517 /_ping: 5518 get: 5519 summary: "Ping" 5520 description: "This is a dummy endpoint you can use to test if the server is accessible." 5521 operationId: "SystemPing" 5522 produces: ["text/plain"] 5523 responses: 5524 200: 5525 description: "no error" 5526 schema: 5527 type: "string" 5528 example: "OK" 5529 headers: 5530 API-Version: 5531 type: "string" 5532 description: "Max API Version the server supports" 5533 Docker-Experimental: 5534 type: "boolean" 5535 description: "If the server is running with experimental mode enabled" 5536 500: 5537 description: "server error" 5538 schema: 5539 $ref: "#/definitions/ErrorResponse" 5540 tags: ["System"] 5541 /commit: 5542 post: 5543 summary: "Create a new image from a container" 5544 operationId: "ImageCommit" 5545 consumes: 5546 - "application/json" 5547 produces: 5548 - "application/json" 5549 responses: 5550 201: 5551 description: "no error" 5552 schema: 5553 $ref: "#/definitions/IdResponse" 5554 404: 5555 description: "no such container" 5556 schema: 5557 $ref: "#/definitions/ErrorResponse" 5558 examples: 5559 application/json: 5560 message: "No such container: c2ada9df5af8" 5561 500: 5562 description: "server error" 5563 schema: 5564 $ref: "#/definitions/ErrorResponse" 5565 parameters: 5566 - name: "containerConfig" 5567 in: "body" 5568 description: "The container configuration" 5569 schema: 5570 $ref: "#/definitions/Config" 5571 - name: "container" 5572 in: "query" 5573 description: "The ID or name of the container to commit" 5574 type: "string" 5575 - name: "repo" 5576 in: "query" 5577 description: "Repository name for the created image" 5578 type: "string" 5579 - name: "tag" 5580 in: "query" 5581 description: "Tag name for the create image" 5582 type: "string" 5583 - name: "comment" 5584 in: "query" 5585 description: "Commit message" 5586 type: "string" 5587 - name: "author" 5588 in: "query" 5589 description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)" 5590 type: "string" 5591 - name: "pause" 5592 in: "query" 5593 description: "Whether to pause the container before committing" 5594 type: "boolean" 5595 default: true 5596 - name: "changes" 5597 in: "query" 5598 description: "`Dockerfile` instructions to apply while committing" 5599 type: "string" 5600 tags: ["Image"] 5601 /events: 5602 get: 5603 summary: "Monitor events" 5604 description: | 5605 Stream real-time events from the server. 5606 5607 Various objects within Docker report events when something happens to them. 5608 5609 Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, health_status, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update` 5610 5611 Images report these events: `delete, import, load, pull, push, save, tag, untag` 5612 5613 Volumes report these events: `create, mount, unmount, destroy` 5614 5615 Networks report these events: `create, connect, disconnect, destroy` 5616 5617 The Docker daemon reports these events: `reload` 5618 5619 operationId: "SystemEvents" 5620 produces: 5621 - "application/json" 5622 responses: 5623 200: 5624 description: "no error" 5625 schema: 5626 type: "object" 5627 properties: 5628 Type: 5629 description: "The type of object emitting the event" 5630 type: "string" 5631 Action: 5632 description: "The type of event" 5633 type: "string" 5634 Actor: 5635 type: "object" 5636 properties: 5637 ID: 5638 description: "The ID of the object emitting the event" 5639 type: "string" 5640 Attributes: 5641 description: "Various key/value attributes of the object, depending on its type" 5642 type: "object" 5643 additionalProperties: 5644 type: "string" 5645 time: 5646 description: "Timestamp of event" 5647 type: "integer" 5648 timeNano: 5649 description: "Timestamp of event, with nanosecond accuracy" 5650 type: "integer" 5651 format: "int64" 5652 examples: 5653 application/json: 5654 Type: "container" 5655 Action: "create" 5656 Actor: 5657 ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" 5658 Attributes: 5659 com.example.some-label: "some-label-value" 5660 image: "alpine" 5661 name: "my-container" 5662 time: 1461943101 5663 400: 5664 description: "bad parameter" 5665 schema: 5666 $ref: "#/definitions/ErrorResponse" 5667 500: 5668 description: "server error" 5669 schema: 5670 $ref: "#/definitions/ErrorResponse" 5671 parameters: 5672 - name: "since" 5673 in: "query" 5674 description: "Show events created since this timestamp then stream new events." 5675 type: "string" 5676 - name: "until" 5677 in: "query" 5678 description: "Show events created until this timestamp then stop streaming." 5679 type: "string" 5680 - name: "filters" 5681 in: "query" 5682 description: | 5683 A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: 5684 5685 - `container=<string>` container name or ID 5686 - `daemon=<string>` daemon name or ID 5687 - `event=<string>` event type 5688 - `image=<string>` image name or ID 5689 - `label=<string>` image or container label 5690 - `network=<string>` network name or ID 5691 - `plugin`=<string> plugin name or ID 5692 - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` 5693 - `volume=<string>` volume name or ID 5694 type: "string" 5695 tags: ["System"] 5696 /system/df: 5697 get: 5698 summary: "Get data usage information" 5699 operationId: "SystemDataUsage" 5700 responses: 5701 200: 5702 description: "no error" 5703 schema: 5704 type: "object" 5705 properties: 5706 LayersSize: 5707 type: "integer" 5708 format: "int64" 5709 Images: 5710 type: "array" 5711 items: 5712 $ref: "#/definitions/ImageSummary" 5713 Containers: 5714 type: "array" 5715 items: 5716 $ref: "#/definitions/ContainerSummary" 5717 Volumes: 5718 type: "array" 5719 items: 5720 $ref: "#/definitions/Volume" 5721 example: 5722 LayersSize: 1092588 5723 Images: 5724 - 5725 Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 5726 ParentId: "" 5727 RepoTags: 5728 - "busybox:latest" 5729 RepoDigests: 5730 - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" 5731 Created: 1466724217 5732 Size: 1092588 5733 SharedSize: 0 5734 VirtualSize: 1092588 5735 Labels: {} 5736 Containers: 1 5737 Containers: 5738 - 5739 Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" 5740 Names: 5741 - "/top" 5742 Image: "busybox" 5743 ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 5744 Command: "top" 5745 Created: 1472592424 5746 Ports: [] 5747 SizeRootFs: 1092588 5748 Labels: {} 5749 State: "exited" 5750 Status: "Exited (0) 56 minutes ago" 5751 HostConfig: 5752 NetworkMode: "default" 5753 NetworkSettings: 5754 Networks: 5755 bridge: 5756 IPAMConfig: null 5757 Links: null 5758 Aliases: null 5759 NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" 5760 EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" 5761 Gateway: "172.18.0.1" 5762 IPAddress: "172.18.0.2" 5763 IPPrefixLen: 16 5764 IPv6Gateway: "" 5765 GlobalIPv6Address: "" 5766 GlobalIPv6PrefixLen: 0 5767 MacAddress: "02:42:ac:12:00:02" 5768 Mounts: [] 5769 Volumes: 5770 - 5771 Name: "my-volume" 5772 Driver: "local" 5773 Mountpoint: "" 5774 Labels: null 5775 Scope: "" 5776 Options: null 5777 UsageData: 5778 Size: 0 5779 RefCount: 0 5780 500: 5781 description: "server error" 5782 schema: 5783 $ref: "#/definitions/ErrorResponse" 5784 tags: ["System"] 5785 /images/{name}/get: 5786 get: 5787 summary: "Export an image" 5788 description: | 5789 Get a tarball containing all images and metadata for a repository. 5790 5791 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. 5792 5793 ### Image tarball format 5794 5795 An image tarball contains one directory per image layer (named using its long ID), each containing these files: 5796 5797 - `VERSION`: currently `1.0` - the file format version 5798 - `json`: detailed layer information, similar to `docker inspect layer_id` 5799 - `layer.tar`: A tarfile containing the filesystem changes in this layer 5800 5801 The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. 5802 5803 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. 5804 5805 ```json 5806 { 5807 "hello-world": { 5808 "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" 5809 } 5810 } 5811 ``` 5812 operationId: "ImageGet" 5813 produces: 5814 - "application/x-tar" 5815 responses: 5816 200: 5817 description: "no error" 5818 schema: 5819 type: "string" 5820 format: "binary" 5821 500: 5822 description: "server error" 5823 schema: 5824 $ref: "#/definitions/ErrorResponse" 5825 parameters: 5826 - name: "name" 5827 in: "path" 5828 description: "Image name or ID" 5829 type: "string" 5830 required: true 5831 tags: ["Image"] 5832 /images/get: 5833 get: 5834 summary: "Export several images" 5835 description: | 5836 Get a tarball containing all images and metadata for several image repositories. 5837 5838 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. 5839 5840 For details on the format, see [the export image endpoint](#operation/ImageGet). 5841 operationId: "ImageGetAll" 5842 produces: 5843 - "application/x-tar" 5844 responses: 5845 200: 5846 description: "no error" 5847 schema: 5848 type: "string" 5849 format: "binary" 5850 500: 5851 description: "server error" 5852 schema: 5853 $ref: "#/definitions/ErrorResponse" 5854 parameters: 5855 - name: "names" 5856 in: "query" 5857 description: "Image names to filter by" 5858 type: "array" 5859 items: 5860 type: "string" 5861 tags: ["Image"] 5862 /images/load: 5863 post: 5864 summary: "Import images" 5865 description: | 5866 Load a set of images and tags into a repository. 5867 5868 For details on the format, see [the export image endpoint](#operation/ImageGet). 5869 operationId: "ImageLoad" 5870 consumes: 5871 - "application/x-tar" 5872 produces: 5873 - "application/json" 5874 responses: 5875 200: 5876 description: "no error" 5877 500: 5878 description: "server error" 5879 schema: 5880 $ref: "#/definitions/ErrorResponse" 5881 parameters: 5882 - name: "imagesTarball" 5883 in: "body" 5884 description: "Tar archive containing images" 5885 schema: 5886 type: "string" 5887 format: "binary" 5888 - name: "quiet" 5889 in: "query" 5890 description: "Suppress progress details during load." 5891 type: "boolean" 5892 default: false 5893 tags: ["Image"] 5894 /containers/{id}/exec: 5895 post: 5896 summary: "Create an exec instance" 5897 description: "Run a command inside a running container." 5898 operationId: "ContainerExec" 5899 consumes: 5900 - "application/json" 5901 produces: 5902 - "application/json" 5903 responses: 5904 201: 5905 description: "no error" 5906 schema: 5907 $ref: "#/definitions/IdResponse" 5908 404: 5909 description: "no such container" 5910 schema: 5911 $ref: "#/definitions/ErrorResponse" 5912 examples: 5913 application/json: 5914 message: "No such container: c2ada9df5af8" 5915 409: 5916 description: "container is paused" 5917 schema: 5918 $ref: "#/definitions/ErrorResponse" 5919 500: 5920 description: "Server error" 5921 schema: 5922 $ref: "#/definitions/ErrorResponse" 5923 parameters: 5924 - name: "execConfig" 5925 in: "body" 5926 description: "Exec configuration" 5927 schema: 5928 type: "object" 5929 properties: 5930 AttachStdin: 5931 type: "boolean" 5932 description: "Attach to `stdin` of the exec command." 5933 AttachStdout: 5934 type: "boolean" 5935 description: "Attach to `stdout` of the exec command." 5936 AttachStderr: 5937 type: "boolean" 5938 description: "Attach to `stderr` of the exec command." 5939 DetachKeys: 5940 type: "string" 5941 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 `_`." 5942 Tty: 5943 type: "boolean" 5944 description: "Allocate a pseudo-TTY." 5945 Env: 5946 description: "A list of environment variables in the form `[\"VAR=value\", ...]`." 5947 type: "array" 5948 items: 5949 type: "string" 5950 Cmd: 5951 type: "array" 5952 description: "Command to run, as a string or array of strings." 5953 items: 5954 type: "string" 5955 Privileged: 5956 type: "boolean" 5957 description: "Runs the exec process with extended privileges." 5958 default: false 5959 User: 5960 type: "string" 5961 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`." 5962 example: 5963 AttachStdin: false 5964 AttachStdout: true 5965 AttachStderr: true 5966 DetachKeys: "ctrl-p,ctrl-q" 5967 Tty: false 5968 Cmd: 5969 - "date" 5970 Env: 5971 - "FOO=bar" 5972 - "BAZ=quux" 5973 required: true 5974 - name: "id" 5975 in: "path" 5976 description: "ID or name of container" 5977 type: "string" 5978 required: true 5979 tags: ["Exec"] 5980 /exec/{id}/start: 5981 post: 5982 summary: "Start an exec instance" 5983 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." 5984 operationId: "ExecStart" 5985 consumes: 5986 - "application/json" 5987 produces: 5988 - "application/vnd.docker.raw-stream" 5989 responses: 5990 200: 5991 description: "No error" 5992 404: 5993 description: "No such exec instance" 5994 schema: 5995 $ref: "#/definitions/ErrorResponse" 5996 409: 5997 description: "Container is stopped or paused" 5998 schema: 5999 $ref: "#/definitions/ErrorResponse" 6000 parameters: 6001 - name: "execStartConfig" 6002 in: "body" 6003 schema: 6004 type: "object" 6005 properties: 6006 Detach: 6007 type: "boolean" 6008 description: "Detach from the command." 6009 Tty: 6010 type: "boolean" 6011 description: "Allocate a pseudo-TTY." 6012 example: 6013 Detach: false 6014 Tty: false 6015 - name: "id" 6016 in: "path" 6017 description: "Exec instance ID" 6018 required: true 6019 type: "string" 6020 tags: ["Exec"] 6021 /exec/{id}/resize: 6022 post: 6023 summary: "Resize an exec instance" 6024 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." 6025 operationId: "ExecResize" 6026 responses: 6027 201: 6028 description: "No error" 6029 404: 6030 description: "No such exec instance" 6031 schema: 6032 $ref: "#/definitions/ErrorResponse" 6033 parameters: 6034 - name: "id" 6035 in: "path" 6036 description: "Exec instance ID" 6037 required: true 6038 type: "string" 6039 - name: "h" 6040 in: "query" 6041 description: "Height of the TTY session in characters" 6042 type: "integer" 6043 - name: "w" 6044 in: "query" 6045 description: "Width of the TTY session in characters" 6046 type: "integer" 6047 tags: ["Exec"] 6048 /exec/{id}/json: 6049 get: 6050 summary: "Inspect an exec instance" 6051 description: "Return low-level information about an exec instance." 6052 operationId: "ExecInspect" 6053 produces: 6054 - "application/json" 6055 responses: 6056 200: 6057 description: "No error" 6058 schema: 6059 type: "object" 6060 properties: 6061 ID: 6062 type: "string" 6063 Running: 6064 type: "boolean" 6065 ExitCode: 6066 type: "integer" 6067 ProcessConfig: 6068 $ref: "#/definitions/ProcessConfig" 6069 OpenStdin: 6070 type: "boolean" 6071 OpenStderr: 6072 type: "boolean" 6073 OpenStdout: 6074 type: "boolean" 6075 ContainerID: 6076 type: "string" 6077 Pid: 6078 type: "integer" 6079 description: "The system process ID for the exec process." 6080 examples: 6081 application/json: 6082 CanRemove: false 6083 ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" 6084 DetachKeys: "" 6085 ExitCode: 2 6086 ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" 6087 OpenStderr: true 6088 OpenStdin: true 6089 OpenStdout: true 6090 ProcessConfig: 6091 arguments: 6092 - "-c" 6093 - "exit 2" 6094 entrypoint: "sh" 6095 privileged: false 6096 tty: true 6097 user: "1000" 6098 Running: false 6099 Pid: 42000 6100 404: 6101 description: "No such exec instance" 6102 schema: 6103 $ref: "#/definitions/ErrorResponse" 6104 500: 6105 description: "Server error" 6106 schema: 6107 $ref: "#/definitions/ErrorResponse" 6108 parameters: 6109 - name: "id" 6110 in: "path" 6111 description: "Exec instance ID" 6112 required: true 6113 type: "string" 6114 tags: ["Exec"] 6115 6116 /volumes: 6117 get: 6118 summary: "List volumes" 6119 operationId: "VolumeList" 6120 produces: ["application/json"] 6121 responses: 6122 200: 6123 description: "Summary volume data that matches the query" 6124 schema: 6125 type: "object" 6126 required: [Volumes, Warnings] 6127 properties: 6128 Volumes: 6129 type: "array" 6130 x-nullable: false 6131 description: "List of volumes" 6132 items: 6133 $ref: "#/definitions/Volume" 6134 Warnings: 6135 type: "array" 6136 x-nullable: false 6137 description: "Warnings that occurred when fetching the list of volumes" 6138 items: 6139 type: "string" 6140 6141 examples: 6142 application/json: 6143 Volumes: 6144 - Name: "tardis" 6145 Driver: "local" 6146 Mountpoint: "/var/lib/docker/volumes/tardis" 6147 Labels: 6148 com.example.some-label: "some-value" 6149 com.example.some-other-label: "some-other-value" 6150 Scope: "local" 6151 Options: 6152 device: "tmpfs" 6153 o: "size=100m,uid=1000" 6154 type: "tmpfs" 6155 Warnings: [] 6156 500: 6157 description: "Server error" 6158 schema: 6159 $ref: "#/definitions/ErrorResponse" 6160 parameters: 6161 - name: "filters" 6162 in: "query" 6163 description: | 6164 JSON encoded value of the filters (a `map[string][]string`) to 6165 process on the volumes list. Available filters: 6166 6167 - `dangling=<boolean>` When set to `true` (or `1`), returns all 6168 volumes that are not in use by a container. When set to `false` 6169 (or `0`), only volumes that are in use by one or more 6170 containers are returned. 6171 - `driver=<volume-driver-name>` Matches volumes based on their driver. 6172 - `label=<key>` or `label=<key>:<value>` Matches volumes based on 6173 the presence of a `label` alone or a `label` and a value. 6174 - `name=<volume-name>` Matches all or part of a volume name. 6175 type: "string" 6176 format: "json" 6177 tags: ["Volume"] 6178 6179 /volumes/create: 6180 post: 6181 summary: "Create a volume" 6182 operationId: "VolumeCreate" 6183 consumes: ["application/json"] 6184 produces: ["application/json"] 6185 responses: 6186 201: 6187 description: "The volume was created successfully" 6188 schema: 6189 $ref: "#/definitions/Volume" 6190 500: 6191 description: "Server error" 6192 schema: 6193 $ref: "#/definitions/ErrorResponse" 6194 parameters: 6195 - name: "volumeConfig" 6196 in: "body" 6197 required: true 6198 description: "Volume configuration" 6199 schema: 6200 type: "object" 6201 properties: 6202 Name: 6203 description: "The new volume's name. If not specified, Docker generates a name." 6204 type: "string" 6205 x-nullable: false 6206 Driver: 6207 description: "Name of the volume driver to use." 6208 type: "string" 6209 default: "local" 6210 x-nullable: false 6211 DriverOpts: 6212 description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific." 6213 type: "object" 6214 additionalProperties: 6215 type: "string" 6216 Labels: 6217 description: "User-defined key/value metadata." 6218 type: "object" 6219 additionalProperties: 6220 type: "string" 6221 example: 6222 Name: "tardis" 6223 Labels: 6224 com.example.some-label: "some-value" 6225 com.example.some-other-label: "some-other-value" 6226 Driver: "custom" 6227 tags: ["Volume"] 6228 6229 /volumes/{name}: 6230 get: 6231 summary: "Inspect a volume" 6232 operationId: "VolumeInspect" 6233 produces: ["application/json"] 6234 responses: 6235 200: 6236 description: "No error" 6237 schema: 6238 $ref: "#/definitions/Volume" 6239 404: 6240 description: "No such volume" 6241 schema: 6242 $ref: "#/definitions/ErrorResponse" 6243 500: 6244 description: "Server error" 6245 schema: 6246 $ref: "#/definitions/ErrorResponse" 6247 parameters: 6248 - name: "name" 6249 in: "path" 6250 required: true 6251 description: "Volume name or ID" 6252 type: "string" 6253 tags: ["Volume"] 6254 6255 delete: 6256 summary: "Remove a volume" 6257 description: "Instruct the driver to remove the volume." 6258 operationId: "VolumeDelete" 6259 responses: 6260 204: 6261 description: "The volume was removed" 6262 404: 6263 description: "No such volume or volume driver" 6264 schema: 6265 $ref: "#/definitions/ErrorResponse" 6266 409: 6267 description: "Volume is in use and cannot be removed" 6268 schema: 6269 $ref: "#/definitions/ErrorResponse" 6270 500: 6271 description: "Server error" 6272 schema: 6273 $ref: "#/definitions/ErrorResponse" 6274 parameters: 6275 - name: "name" 6276 in: "path" 6277 required: true 6278 description: "Volume name or ID" 6279 type: "string" 6280 - name: "force" 6281 in: "query" 6282 description: "Force the removal of the volume" 6283 type: "boolean" 6284 default: false 6285 tags: ["Volume"] 6286 /volumes/prune: 6287 post: 6288 summary: "Delete unused volumes" 6289 produces: 6290 - "application/json" 6291 operationId: "VolumePrune" 6292 parameters: 6293 - name: "filters" 6294 in: "query" 6295 description: | 6296 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 6297 6298 Available filters: 6299 - `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. 6300 type: "string" 6301 responses: 6302 200: 6303 description: "No error" 6304 schema: 6305 type: "object" 6306 properties: 6307 VolumesDeleted: 6308 description: "Volumes that were deleted" 6309 type: "array" 6310 items: 6311 type: "string" 6312 SpaceReclaimed: 6313 description: "Disk space reclaimed in bytes" 6314 type: "integer" 6315 format: "int64" 6316 500: 6317 description: "Server error" 6318 schema: 6319 $ref: "#/definitions/ErrorResponse" 6320 tags: ["Volume"] 6321 /networks: 6322 get: 6323 summary: "List networks" 6324 description: | 6325 Returns a list of networks. For details on the format, see [the network inspect endpoint](#operation/NetworkInspect). 6326 6327 Note that it uses a different, smaller representation of a network than inspecting a single network. For example, 6328 the list of containers attached to the network is not propagated in API versions 1.28 and up. 6329 operationId: "NetworkList" 6330 produces: 6331 - "application/json" 6332 responses: 6333 200: 6334 description: "No error" 6335 schema: 6336 type: "array" 6337 items: 6338 $ref: "#/definitions/Network" 6339 examples: 6340 application/json: 6341 - Name: "bridge" 6342 Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" 6343 Created: "2016-10-19T06:21:00.416543526Z" 6344 Scope: "local" 6345 Driver: "bridge" 6346 EnableIPv6: false 6347 Internal: false 6348 Attachable: false 6349 Ingress: false 6350 IPAM: 6351 Driver: "default" 6352 Config: 6353 - 6354 Subnet: "172.17.0.0/16" 6355 Options: 6356 com.docker.network.bridge.default_bridge: "true" 6357 com.docker.network.bridge.enable_icc: "true" 6358 com.docker.network.bridge.enable_ip_masquerade: "true" 6359 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 6360 com.docker.network.bridge.name: "docker0" 6361 com.docker.network.driver.mtu: "1500" 6362 - Name: "none" 6363 Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" 6364 Created: "0001-01-01T00:00:00Z" 6365 Scope: "local" 6366 Driver: "null" 6367 EnableIPv6: false 6368 Internal: false 6369 Attachable: false 6370 Ingress: false 6371 IPAM: 6372 Driver: "default" 6373 Config: [] 6374 Containers: {} 6375 Options: {} 6376 - Name: "host" 6377 Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" 6378 Created: "0001-01-01T00:00:00Z" 6379 Scope: "local" 6380 Driver: "host" 6381 EnableIPv6: false 6382 Internal: false 6383 Attachable: false 6384 Ingress: false 6385 IPAM: 6386 Driver: "default" 6387 Config: [] 6388 Containers: {} 6389 Options: {} 6390 500: 6391 description: "Server error" 6392 schema: 6393 $ref: "#/definitions/ErrorResponse" 6394 parameters: 6395 - name: "filters" 6396 in: "query" 6397 description: | 6398 JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: 6399 6400 - `driver=<driver-name>` Matches a network's driver. 6401 - `id=<network-id>` Matches all or part of a network ID. 6402 - `label=<key>` or `label=<key>=<value>` of a network label. 6403 - `name=<network-name>` Matches all or part of a network name. 6404 - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). 6405 - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. 6406 type: "string" 6407 tags: ["Network"] 6408 6409 /networks/{id}: 6410 get: 6411 summary: "Inspect a network" 6412 operationId: "NetworkInspect" 6413 produces: 6414 - "application/json" 6415 responses: 6416 200: 6417 description: "No error" 6418 schema: 6419 $ref: "#/definitions/Network" 6420 404: 6421 description: "Network not found" 6422 schema: 6423 $ref: "#/definitions/ErrorResponse" 6424 500: 6425 description: "Server error" 6426 schema: 6427 $ref: "#/definitions/ErrorResponse" 6428 parameters: 6429 - name: "id" 6430 in: "path" 6431 description: "Network ID or name" 6432 required: true 6433 type: "string" 6434 - name: "verbose" 6435 in: "query" 6436 description: "Detailed inspect output for troubleshooting" 6437 type: "boolean" 6438 default: false 6439 tags: ["Network"] 6440 6441 delete: 6442 summary: "Remove a network" 6443 operationId: "NetworkDelete" 6444 responses: 6445 204: 6446 description: "No error" 6447 403: 6448 description: "operation not supported for pre-defined networks" 6449 schema: 6450 $ref: "#/definitions/ErrorResponse" 6451 404: 6452 description: "no such network" 6453 schema: 6454 $ref: "#/definitions/ErrorResponse" 6455 500: 6456 description: "Server error" 6457 schema: 6458 $ref: "#/definitions/ErrorResponse" 6459 parameters: 6460 - name: "id" 6461 in: "path" 6462 description: "Network ID or name" 6463 required: true 6464 type: "string" 6465 tags: ["Network"] 6466 6467 /networks/create: 6468 post: 6469 summary: "Create a network" 6470 operationId: "NetworkCreate" 6471 consumes: 6472 - "application/json" 6473 produces: 6474 - "application/json" 6475 responses: 6476 201: 6477 description: "No error" 6478 schema: 6479 type: "object" 6480 properties: 6481 Id: 6482 description: "The ID of the created network." 6483 type: "string" 6484 Warning: 6485 type: "string" 6486 example: 6487 Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" 6488 Warning: "" 6489 403: 6490 description: "operation not supported for pre-defined networks" 6491 schema: 6492 $ref: "#/definitions/ErrorResponse" 6493 404: 6494 description: "plugin not found" 6495 schema: 6496 $ref: "#/definitions/ErrorResponse" 6497 500: 6498 description: "Server error" 6499 schema: 6500 $ref: "#/definitions/ErrorResponse" 6501 parameters: 6502 - name: "networkConfig" 6503 in: "body" 6504 description: "Network configuration" 6505 required: true 6506 schema: 6507 type: "object" 6508 required: ["Name"] 6509 properties: 6510 Name: 6511 description: "The network's name." 6512 type: "string" 6513 CheckDuplicate: 6514 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." 6515 type: "boolean" 6516 Driver: 6517 description: "Name of the network driver plugin to use." 6518 type: "string" 6519 default: "bridge" 6520 Internal: 6521 description: "Restrict external access to the network." 6522 type: "boolean" 6523 Attachable: 6524 description: "Globally scoped network is manually attachable by regular containers from workers in swarm mode." 6525 type: "boolean" 6526 Ingress: 6527 description: "Ingress network is the network which provides the routing-mesh in swarm mode." 6528 type: "boolean" 6529 IPAM: 6530 description: "Optional custom IP scheme for the network." 6531 $ref: "#/definitions/IPAM" 6532 EnableIPv6: 6533 description: "Enable IPv6 on the network." 6534 type: "boolean" 6535 Options: 6536 description: "Network specific options to be used by the drivers." 6537 type: "object" 6538 additionalProperties: 6539 type: "string" 6540 Labels: 6541 description: "User-defined key/value metadata." 6542 type: "object" 6543 additionalProperties: 6544 type: "string" 6545 example: 6546 Name: "isolated_nw" 6547 CheckDuplicate: false 6548 Driver: "bridge" 6549 EnableIPv6: true 6550 IPAM: 6551 Driver: "default" 6552 Config: 6553 - Subnet: "172.20.0.0/16" 6554 IPRange: "172.20.10.0/24" 6555 Gateway: "172.20.10.11" 6556 - Subnet: "2001:db8:abcd::/64" 6557 Gateway: "2001:db8:abcd::1011" 6558 Options: 6559 foo: "bar" 6560 Internal: true 6561 Attachable: false 6562 Ingress: false 6563 Options: 6564 com.docker.network.bridge.default_bridge: "true" 6565 com.docker.network.bridge.enable_icc: "true" 6566 com.docker.network.bridge.enable_ip_masquerade: "true" 6567 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 6568 com.docker.network.bridge.name: "docker0" 6569 com.docker.network.driver.mtu: "1500" 6570 Labels: 6571 com.example.some-label: "some-value" 6572 com.example.some-other-label: "some-other-value" 6573 tags: ["Network"] 6574 6575 /networks/{id}/connect: 6576 post: 6577 summary: "Connect a container to a network" 6578 operationId: "NetworkConnect" 6579 consumes: 6580 - "application/octet-stream" 6581 responses: 6582 200: 6583 description: "No error" 6584 403: 6585 description: "Operation not supported for swarm scoped networks" 6586 schema: 6587 $ref: "#/definitions/ErrorResponse" 6588 404: 6589 description: "Network or container not found" 6590 schema: 6591 $ref: "#/definitions/ErrorResponse" 6592 500: 6593 description: "Server error" 6594 schema: 6595 $ref: "#/definitions/ErrorResponse" 6596 parameters: 6597 - name: "id" 6598 in: "path" 6599 description: "Network ID or name" 6600 required: true 6601 type: "string" 6602 - name: "container" 6603 in: "body" 6604 required: true 6605 schema: 6606 type: "object" 6607 properties: 6608 Container: 6609 type: "string" 6610 description: "The ID or name of the container to connect to the network." 6611 EndpointConfig: 6612 $ref: "#/definitions/EndpointSettings" 6613 example: 6614 Container: "3613f73ba0e4" 6615 EndpointConfig: 6616 IPAMConfig: 6617 IPv4Address: "172.24.56.89" 6618 IPv6Address: "2001:db8::5689" 6619 tags: ["Network"] 6620 6621 /networks/{id}/disconnect: 6622 post: 6623 summary: "Disconnect a container from a network" 6624 operationId: "NetworkDisconnect" 6625 consumes: 6626 - "application/json" 6627 responses: 6628 200: 6629 description: "No error" 6630 403: 6631 description: "Operation not supported for swarm scoped networks" 6632 schema: 6633 $ref: "#/definitions/ErrorResponse" 6634 404: 6635 description: "Network or container not found" 6636 schema: 6637 $ref: "#/definitions/ErrorResponse" 6638 500: 6639 description: "Server error" 6640 schema: 6641 $ref: "#/definitions/ErrorResponse" 6642 parameters: 6643 - name: "id" 6644 in: "path" 6645 description: "Network ID or name" 6646 required: true 6647 type: "string" 6648 - name: "container" 6649 in: "body" 6650 required: true 6651 schema: 6652 type: "object" 6653 properties: 6654 Container: 6655 type: "string" 6656 description: "The ID or name of the container to disconnect from the network." 6657 Force: 6658 type: "boolean" 6659 description: "Force the container to disconnect from the network." 6660 tags: ["Network"] 6661 /networks/prune: 6662 post: 6663 summary: "Delete unused networks" 6664 produces: 6665 - "application/json" 6666 operationId: "NetworkPrune" 6667 parameters: 6668 - name: "filters" 6669 in: "query" 6670 description: | 6671 Filters to process on the prune list, encoded as JSON (a `map[string][]string`). 6672 6673 Available filters: 6674 - `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. 6675 - `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. 6676 type: "string" 6677 responses: 6678 200: 6679 description: "No error" 6680 schema: 6681 type: "object" 6682 properties: 6683 NetworksDeleted: 6684 description: "Networks that were deleted" 6685 type: "array" 6686 items: 6687 type: "string" 6688 500: 6689 description: "Server error" 6690 schema: 6691 $ref: "#/definitions/ErrorResponse" 6692 tags: ["Network"] 6693 /plugins: 6694 get: 6695 summary: "List plugins" 6696 operationId: "PluginList" 6697 description: "Returns information about installed plugins." 6698 produces: ["application/json"] 6699 responses: 6700 200: 6701 description: "No error" 6702 schema: 6703 type: "array" 6704 items: 6705 $ref: "#/definitions/Plugin" 6706 example: 6707 - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" 6708 Name: "tiborvass/sample-volume-plugin" 6709 Tag: "latest" 6710 Active: true 6711 Settings: 6712 Env: 6713 - "DEBUG=0" 6714 Args: null 6715 Devices: null 6716 Config: 6717 Description: "A sample volume plugin for Docker" 6718 Documentation: "https://docs.docker.com/engine/extend/plugins/" 6719 Interface: 6720 Types: 6721 - "docker.volumedriver/1.0" 6722 Socket: "plugins.sock" 6723 Entrypoint: 6724 - "/usr/bin/sample-volume-plugin" 6725 - "/data" 6726 WorkDir: "" 6727 User: {} 6728 Network: 6729 Type: "" 6730 Linux: 6731 Capabilities: null 6732 AllowAllDevices: false 6733 Devices: null 6734 Mounts: null 6735 PropagatedMount: "/data" 6736 Env: 6737 - Name: "DEBUG" 6738 Description: "If set, prints debug messages" 6739 Settable: null 6740 Value: "0" 6741 Args: 6742 Name: "args" 6743 Description: "command line arguments" 6744 Settable: null 6745 Value: [] 6746 500: 6747 description: "Server error" 6748 schema: 6749 $ref: "#/definitions/ErrorResponse" 6750 parameters: 6751 - name: "filters" 6752 in: "query" 6753 type: "string" 6754 description: | 6755 A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters: 6756 6757 - `capability=<capability name>` 6758 - `enable=<true>|<false>` 6759 tags: ["Plugin"] 6760 6761 /plugins/privileges: 6762 get: 6763 summary: "Get plugin privileges" 6764 operationId: "GetPluginPrivileges" 6765 responses: 6766 200: 6767 description: "no error" 6768 schema: 6769 type: "array" 6770 items: 6771 description: "Describes a permission the user has to accept upon installing the plugin." 6772 type: "object" 6773 properties: 6774 Name: 6775 type: "string" 6776 Description: 6777 type: "string" 6778 Value: 6779 type: "array" 6780 items: 6781 type: "string" 6782 example: 6783 - Name: "network" 6784 Description: "" 6785 Value: 6786 - "host" 6787 - Name: "mount" 6788 Description: "" 6789 Value: 6790 - "/data" 6791 - Name: "device" 6792 Description: "" 6793 Value: 6794 - "/dev/cpu_dma_latency" 6795 500: 6796 description: "server error" 6797 schema: 6798 $ref: "#/definitions/ErrorResponse" 6799 parameters: 6800 - name: "remote" 6801 in: "query" 6802 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6803 required: true 6804 type: "string" 6805 tags: 6806 - "Plugin" 6807 6808 /plugins/pull: 6809 post: 6810 summary: "Install a plugin" 6811 operationId: "PluginPull" 6812 description: | 6813 Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). 6814 produces: 6815 - "application/json" 6816 responses: 6817 204: 6818 description: "no error" 6819 500: 6820 description: "server error" 6821 schema: 6822 $ref: "#/definitions/ErrorResponse" 6823 parameters: 6824 - name: "remote" 6825 in: "query" 6826 description: | 6827 Remote reference for plugin to install. 6828 6829 The `:latest` tag is optional, and is used as the default if omitted. 6830 required: true 6831 type: "string" 6832 - name: "name" 6833 in: "query" 6834 description: | 6835 Local name for the pulled plugin. 6836 6837 The `:latest` tag is optional, and is used as the default if omitted. 6838 required: false 6839 type: "string" 6840 - name: "X-Registry-Auth" 6841 in: "header" 6842 description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)" 6843 type: "string" 6844 - name: "body" 6845 in: "body" 6846 schema: 6847 type: "array" 6848 items: 6849 description: "Describes a permission accepted by the user upon installing the plugin." 6850 type: "object" 6851 properties: 6852 Name: 6853 type: "string" 6854 Description: 6855 type: "string" 6856 Value: 6857 type: "array" 6858 items: 6859 type: "string" 6860 example: 6861 - Name: "network" 6862 Description: "" 6863 Value: 6864 - "host" 6865 - Name: "mount" 6866 Description: "" 6867 Value: 6868 - "/data" 6869 - Name: "device" 6870 Description: "" 6871 Value: 6872 - "/dev/cpu_dma_latency" 6873 tags: ["Plugin"] 6874 /plugins/{name}/json: 6875 get: 6876 summary: "Inspect a plugin" 6877 operationId: "PluginInspect" 6878 responses: 6879 200: 6880 description: "no error" 6881 schema: 6882 $ref: "#/definitions/Plugin" 6883 404: 6884 description: "plugin is not installed" 6885 schema: 6886 $ref: "#/definitions/ErrorResponse" 6887 500: 6888 description: "server error" 6889 schema: 6890 $ref: "#/definitions/ErrorResponse" 6891 parameters: 6892 - name: "name" 6893 in: "path" 6894 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6895 required: true 6896 type: "string" 6897 tags: ["Plugin"] 6898 /plugins/{name}: 6899 delete: 6900 summary: "Remove a plugin" 6901 operationId: "PluginDelete" 6902 responses: 6903 200: 6904 description: "no error" 6905 schema: 6906 $ref: "#/definitions/Plugin" 6907 404: 6908 description: "plugin is not installed" 6909 schema: 6910 $ref: "#/definitions/ErrorResponse" 6911 500: 6912 description: "server error" 6913 schema: 6914 $ref: "#/definitions/ErrorResponse" 6915 parameters: 6916 - name: "name" 6917 in: "path" 6918 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6919 required: true 6920 type: "string" 6921 - name: "force" 6922 in: "query" 6923 description: "Disable the plugin before removing. This may result in issues if the plugin is in use by a container." 6924 type: "boolean" 6925 default: false 6926 tags: ["Plugin"] 6927 /plugins/{name}/enable: 6928 post: 6929 summary: "Enable a plugin" 6930 operationId: "PluginEnable" 6931 responses: 6932 200: 6933 description: "no error" 6934 404: 6935 description: "plugin is not installed" 6936 schema: 6937 $ref: "#/definitions/ErrorResponse" 6938 500: 6939 description: "server error" 6940 schema: 6941 $ref: "#/definitions/ErrorResponse" 6942 parameters: 6943 - name: "name" 6944 in: "path" 6945 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6946 required: true 6947 type: "string" 6948 - name: "timeout" 6949 in: "query" 6950 description: "Set the HTTP client timeout (in seconds)" 6951 type: "integer" 6952 default: 0 6953 tags: ["Plugin"] 6954 /plugins/{name}/disable: 6955 post: 6956 summary: "Disable a plugin" 6957 operationId: "PluginDisable" 6958 responses: 6959 200: 6960 description: "no error" 6961 404: 6962 description: "plugin is not installed" 6963 schema: 6964 $ref: "#/definitions/ErrorResponse" 6965 500: 6966 description: "server error" 6967 schema: 6968 $ref: "#/definitions/ErrorResponse" 6969 parameters: 6970 - name: "name" 6971 in: "path" 6972 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6973 required: true 6974 type: "string" 6975 tags: ["Plugin"] 6976 /plugins/{name}/upgrade: 6977 post: 6978 summary: "Upgrade a plugin" 6979 operationId: "PluginUpgrade" 6980 responses: 6981 204: 6982 description: "no error" 6983 404: 6984 description: "plugin not installed" 6985 schema: 6986 $ref: "#/definitions/ErrorResponse" 6987 500: 6988 description: "server error" 6989 schema: 6990 $ref: "#/definitions/ErrorResponse" 6991 parameters: 6992 - name: "name" 6993 in: "path" 6994 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6995 required: true 6996 type: "string" 6997 - name: "remote" 6998 in: "query" 6999 description: | 7000 Remote reference to upgrade to. 7001 7002 The `:latest` tag is optional, and is used as the default if omitted. 7003 required: true 7004 type: "string" 7005 - name: "X-Registry-Auth" 7006 in: "header" 7007 description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)" 7008 type: "string" 7009 - name: "body" 7010 in: "body" 7011 schema: 7012 type: "array" 7013 items: 7014 description: "Describes a permission accepted by the user upon installing the plugin." 7015 type: "object" 7016 properties: 7017 Name: 7018 type: "string" 7019 Description: 7020 type: "string" 7021 Value: 7022 type: "array" 7023 items: 7024 type: "string" 7025 example: 7026 - Name: "network" 7027 Description: "" 7028 Value: 7029 - "host" 7030 - Name: "mount" 7031 Description: "" 7032 Value: 7033 - "/data" 7034 - Name: "device" 7035 Description: "" 7036 Value: 7037 - "/dev/cpu_dma_latency" 7038 tags: ["Plugin"] 7039 /plugins/create: 7040 post: 7041 summary: "Create a plugin" 7042 operationId: "PluginCreate" 7043 consumes: 7044 - "application/x-tar" 7045 responses: 7046 204: 7047 description: "no error" 7048 500: 7049 description: "server error" 7050 schema: 7051 $ref: "#/definitions/ErrorResponse" 7052 parameters: 7053 - name: "name" 7054 in: "query" 7055 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 7056 required: true 7057 type: "string" 7058 - name: "tarContext" 7059 in: "body" 7060 description: "Path to tar containing plugin rootfs and manifest" 7061 schema: 7062 type: "string" 7063 format: "binary" 7064 tags: ["Plugin"] 7065 /plugins/{name}/push: 7066 post: 7067 summary: "Push a plugin" 7068 operationId: "PluginPush" 7069 description: | 7070 Push a plugin to the registry. 7071 parameters: 7072 - name: "name" 7073 in: "path" 7074 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 7075 required: true 7076 type: "string" 7077 responses: 7078 200: 7079 description: "no error" 7080 404: 7081 description: "plugin not installed" 7082 schema: 7083 $ref: "#/definitions/ErrorResponse" 7084 500: 7085 description: "server error" 7086 schema: 7087 $ref: "#/definitions/ErrorResponse" 7088 tags: ["Plugin"] 7089 /plugins/{name}/set: 7090 post: 7091 summary: "Configure a plugin" 7092 operationId: "PluginSet" 7093 consumes: 7094 - "application/json" 7095 parameters: 7096 - name: "name" 7097 in: "path" 7098 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 7099 required: true 7100 type: "string" 7101 - name: "body" 7102 in: "body" 7103 schema: 7104 type: "array" 7105 items: 7106 type: "string" 7107 example: ["DEBUG=1"] 7108 responses: 7109 204: 7110 description: "No error" 7111 404: 7112 description: "Plugin not installed" 7113 schema: 7114 $ref: "#/definitions/ErrorResponse" 7115 500: 7116 description: "Server error" 7117 schema: 7118 $ref: "#/definitions/ErrorResponse" 7119 tags: ["Plugin"] 7120 /nodes: 7121 get: 7122 summary: "List nodes" 7123 operationId: "NodeList" 7124 responses: 7125 200: 7126 description: "no error" 7127 schema: 7128 type: "array" 7129 items: 7130 $ref: "#/definitions/Node" 7131 500: 7132 description: "server error" 7133 schema: 7134 $ref: "#/definitions/ErrorResponse" 7135 503: 7136 description: "node is not part of a swarm" 7137 schema: 7138 $ref: "#/definitions/ErrorResponse" 7139 parameters: 7140 - name: "filters" 7141 in: "query" 7142 description: | 7143 Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). 7144 7145 Available filters: 7146 - `id=<node id>` 7147 - `label=<engine label>` 7148 - `membership=`(`accepted`|`pending`)` 7149 - `name=<node name>` 7150 - `role=`(`manager`|`worker`)` 7151 type: "string" 7152 tags: ["Node"] 7153 /nodes/{id}: 7154 get: 7155 summary: "Inspect a node" 7156 operationId: "NodeInspect" 7157 responses: 7158 200: 7159 description: "no error" 7160 schema: 7161 $ref: "#/definitions/Node" 7162 404: 7163 description: "no such node" 7164 schema: 7165 $ref: "#/definitions/ErrorResponse" 7166 500: 7167 description: "server error" 7168 schema: 7169 $ref: "#/definitions/ErrorResponse" 7170 503: 7171 description: "node is not part of a swarm" 7172 schema: 7173 $ref: "#/definitions/ErrorResponse" 7174 parameters: 7175 - name: "id" 7176 in: "path" 7177 description: "The ID or name of the node" 7178 type: "string" 7179 required: true 7180 tags: ["Node"] 7181 delete: 7182 summary: "Delete a node" 7183 operationId: "NodeDelete" 7184 responses: 7185 200: 7186 description: "no error" 7187 404: 7188 description: "no such node" 7189 schema: 7190 $ref: "#/definitions/ErrorResponse" 7191 500: 7192 description: "server error" 7193 schema: 7194 $ref: "#/definitions/ErrorResponse" 7195 503: 7196 description: "node is not part of a swarm" 7197 schema: 7198 $ref: "#/definitions/ErrorResponse" 7199 parameters: 7200 - name: "id" 7201 in: "path" 7202 description: "The ID or name of the node" 7203 type: "string" 7204 required: true 7205 - name: "force" 7206 in: "query" 7207 description: "Force remove a node from the swarm" 7208 default: false 7209 type: "boolean" 7210 tags: ["Node"] 7211 /nodes/{id}/update: 7212 post: 7213 summary: "Update a node" 7214 operationId: "NodeUpdate" 7215 responses: 7216 200: 7217 description: "no error" 7218 400: 7219 description: "bad parameter" 7220 schema: 7221 $ref: "#/definitions/ErrorResponse" 7222 404: 7223 description: "no such node" 7224 schema: 7225 $ref: "#/definitions/ErrorResponse" 7226 500: 7227 description: "server error" 7228 schema: 7229 $ref: "#/definitions/ErrorResponse" 7230 503: 7231 description: "node is not part of a swarm" 7232 schema: 7233 $ref: "#/definitions/ErrorResponse" 7234 parameters: 7235 - name: "id" 7236 in: "path" 7237 description: "The ID of the node" 7238 type: "string" 7239 required: true 7240 - name: "body" 7241 in: "body" 7242 schema: 7243 $ref: "#/definitions/NodeSpec" 7244 - name: "version" 7245 in: "query" 7246 description: "The version number of the node object being updated. This is required to avoid conflicting writes." 7247 type: "integer" 7248 format: "int64" 7249 required: true 7250 tags: ["Node"] 7251 /swarm: 7252 get: 7253 summary: "Inspect swarm" 7254 operationId: "SwarmInspect" 7255 responses: 7256 200: 7257 description: "no error" 7258 schema: 7259 allOf: 7260 - $ref: "#/definitions/ClusterInfo" 7261 - type: "object" 7262 properties: 7263 JoinTokens: 7264 description: "The tokens workers and managers need to join the swarm." 7265 type: "object" 7266 properties: 7267 Worker: 7268 description: "The token workers can use to join the swarm." 7269 type: "string" 7270 Manager: 7271 description: "The token managers can use to join the swarm." 7272 type: "string" 7273 example: 7274 CreatedAt: "2016-08-15T16:00:20.349727406Z" 7275 Spec: 7276 Dispatcher: 7277 HeartbeatPeriod: 5000000000 7278 Orchestration: 7279 TaskHistoryRetentionLimit: 10 7280 CAConfig: 7281 NodeCertExpiry: 7776000000000000 7282 Raft: 7283 LogEntriesForSlowFollowers: 500 7284 HeartbeatTick: 1 7285 SnapshotInterval: 10000 7286 ElectionTick: 3 7287 TaskDefaults: {} 7288 EncryptionConfig: 7289 AutoLockManagers: false 7290 Name: "default" 7291 JoinTokens: 7292 Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a" 7293 Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l" 7294 ID: "70ilmkj2f6sp2137c753w2nmt" 7295 UpdatedAt: "2016-08-15T16:32:09.623207604Z" 7296 Version: 7297 Index: 51 7298 RootRotationInProgress: false 7299 TLSInfo: 7300 TrustRoot: | 7301 -----BEGIN CERTIFICATE----- 7302 MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw 7303 EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 7304 MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH 7305 A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf 7306 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB 7307 Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO 7308 PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz 7309 pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H 7310 -----END CERTIFICATE----- 7311 CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" 7312 CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" 7313 404: 7314 description: "no such swarm" 7315 schema: 7316 $ref: "#/definitions/ErrorResponse" 7317 500: 7318 description: "server error" 7319 schema: 7320 $ref: "#/definitions/ErrorResponse" 7321 503: 7322 description: "node is not part of a swarm" 7323 schema: 7324 $ref: "#/definitions/ErrorResponse" 7325 tags: ["Swarm"] 7326 /swarm/init: 7327 post: 7328 summary: "Initialize a new swarm" 7329 operationId: "SwarmInit" 7330 produces: 7331 - "application/json" 7332 - "text/plain" 7333 responses: 7334 200: 7335 description: "no error" 7336 schema: 7337 description: "The node ID" 7338 type: "string" 7339 example: "7v2t30z9blmxuhnyo6s4cpenp" 7340 400: 7341 description: "bad parameter" 7342 schema: 7343 $ref: "#/definitions/ErrorResponse" 7344 500: 7345 description: "server error" 7346 schema: 7347 $ref: "#/definitions/ErrorResponse" 7348 503: 7349 description: "node is already part of a swarm" 7350 schema: 7351 $ref: "#/definitions/ErrorResponse" 7352 parameters: 7353 - name: "body" 7354 in: "body" 7355 required: true 7356 schema: 7357 type: "object" 7358 properties: 7359 ListenAddr: 7360 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." 7361 type: "string" 7362 AdvertiseAddr: 7363 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." 7364 type: "string" 7365 ForceNewCluster: 7366 description: "Force creation of a new swarm." 7367 type: "boolean" 7368 Spec: 7369 $ref: "#/definitions/SwarmSpec" 7370 example: 7371 ListenAddr: "0.0.0.0:2377" 7372 AdvertiseAddr: "192.168.1.1:2377" 7373 ForceNewCluster: false 7374 Spec: 7375 Orchestration: {} 7376 Raft: {} 7377 Dispatcher: {} 7378 CAConfig: {} 7379 EncryptionConfig: 7380 AutoLockManagers: false 7381 tags: ["Swarm"] 7382 /swarm/join: 7383 post: 7384 summary: "Join an existing swarm" 7385 operationId: "SwarmJoin" 7386 responses: 7387 200: 7388 description: "no error" 7389 400: 7390 description: "bad parameter" 7391 schema: 7392 $ref: "#/definitions/ErrorResponse" 7393 500: 7394 description: "server error" 7395 schema: 7396 $ref: "#/definitions/ErrorResponse" 7397 503: 7398 description: "node is already part of a swarm" 7399 schema: 7400 $ref: "#/definitions/ErrorResponse" 7401 parameters: 7402 - name: "body" 7403 in: "body" 7404 required: true 7405 schema: 7406 type: "object" 7407 properties: 7408 ListenAddr: 7409 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)." 7410 type: "string" 7411 AdvertiseAddr: 7412 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." 7413 type: "string" 7414 RemoteAddrs: 7415 description: "Addresses of manager nodes already participating in the swarm." 7416 type: "string" 7417 JoinToken: 7418 description: "Secret token for joining this swarm." 7419 type: "string" 7420 example: 7421 ListenAddr: "0.0.0.0:2377" 7422 AdvertiseAddr: "192.168.1.1:2377" 7423 RemoteAddrs: 7424 - "node1:2377" 7425 JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 7426 tags: ["Swarm"] 7427 /swarm/leave: 7428 post: 7429 summary: "Leave a swarm" 7430 operationId: "SwarmLeave" 7431 responses: 7432 200: 7433 description: "no error" 7434 500: 7435 description: "server error" 7436 schema: 7437 $ref: "#/definitions/ErrorResponse" 7438 503: 7439 description: "node is not part of a swarm" 7440 schema: 7441 $ref: "#/definitions/ErrorResponse" 7442 parameters: 7443 - name: "force" 7444 description: "Force leave swarm, even if this is the last manager or that it will break the cluster." 7445 in: "query" 7446 type: "boolean" 7447 default: false 7448 tags: ["Swarm"] 7449 /swarm/update: 7450 post: 7451 summary: "Update a swarm" 7452 operationId: "SwarmUpdate" 7453 responses: 7454 200: 7455 description: "no error" 7456 400: 7457 description: "bad parameter" 7458 schema: 7459 $ref: "#/definitions/ErrorResponse" 7460 500: 7461 description: "server error" 7462 schema: 7463 $ref: "#/definitions/ErrorResponse" 7464 503: 7465 description: "node is not part of a swarm" 7466 schema: 7467 $ref: "#/definitions/ErrorResponse" 7468 parameters: 7469 - name: "body" 7470 in: "body" 7471 required: true 7472 schema: 7473 $ref: "#/definitions/SwarmSpec" 7474 - name: "version" 7475 in: "query" 7476 description: "The version number of the swarm object being updated. This is required to avoid conflicting writes." 7477 type: "integer" 7478 format: "int64" 7479 required: true 7480 - name: "rotateWorkerToken" 7481 in: "query" 7482 description: "Rotate the worker join token." 7483 type: "boolean" 7484 default: false 7485 - name: "rotateManagerToken" 7486 in: "query" 7487 description: "Rotate the manager join token." 7488 type: "boolean" 7489 default: false 7490 - name: "rotateManagerUnlockKey" 7491 in: "query" 7492 description: "Rotate the manager unlock key." 7493 type: "boolean" 7494 default: false 7495 tags: ["Swarm"] 7496 /swarm/unlockkey: 7497 get: 7498 summary: "Get the unlock key" 7499 operationId: "SwarmUnlockkey" 7500 consumes: 7501 - "application/json" 7502 responses: 7503 200: 7504 description: "no error" 7505 schema: 7506 type: "object" 7507 properties: 7508 UnlockKey: 7509 description: "The swarm's unlock key." 7510 type: "string" 7511 example: 7512 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 7513 500: 7514 description: "server error" 7515 schema: 7516 $ref: "#/definitions/ErrorResponse" 7517 503: 7518 description: "node is not part of a swarm" 7519 schema: 7520 $ref: "#/definitions/ErrorResponse" 7521 tags: ["Swarm"] 7522 /swarm/unlock: 7523 post: 7524 summary: "Unlock a locked manager" 7525 operationId: "SwarmUnlock" 7526 consumes: 7527 - "application/json" 7528 produces: 7529 - "application/json" 7530 parameters: 7531 - name: "body" 7532 in: "body" 7533 required: true 7534 schema: 7535 type: "object" 7536 properties: 7537 UnlockKey: 7538 description: "The swarm's unlock key." 7539 type: "string" 7540 example: 7541 UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 7542 responses: 7543 200: 7544 description: "no error" 7545 500: 7546 description: "server error" 7547 schema: 7548 $ref: "#/definitions/ErrorResponse" 7549 503: 7550 description: "node is not part of a swarm" 7551 schema: 7552 $ref: "#/definitions/ErrorResponse" 7553 tags: ["Swarm"] 7554 /services: 7555 get: 7556 summary: "List services" 7557 operationId: "ServiceList" 7558 responses: 7559 200: 7560 description: "no error" 7561 schema: 7562 type: "array" 7563 items: 7564 $ref: "#/definitions/Service" 7565 500: 7566 description: "server error" 7567 schema: 7568 $ref: "#/definitions/ErrorResponse" 7569 503: 7570 description: "node is not part of a swarm" 7571 schema: 7572 $ref: "#/definitions/ErrorResponse" 7573 parameters: 7574 - name: "filters" 7575 in: "query" 7576 type: "string" 7577 description: | 7578 A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: 7579 7580 - `id=<service id>` 7581 - `label=<service label>` 7582 - `mode=["replicated"|"global"]` 7583 - `name=<service name>` 7584 tags: ["Service"] 7585 /services/create: 7586 post: 7587 summary: "Create a service" 7588 operationId: "ServiceCreate" 7589 consumes: 7590 - "application/json" 7591 produces: 7592 - "application/json" 7593 responses: 7594 201: 7595 description: "no error" 7596 schema: 7597 type: "object" 7598 properties: 7599 ID: 7600 description: "The ID of the created service." 7601 type: "string" 7602 Warning: 7603 description: "Optional warning message" 7604 type: "string" 7605 example: 7606 ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" 7607 Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" 7608 400: 7609 description: "bad parameter" 7610 schema: 7611 $ref: "#/definitions/ErrorResponse" 7612 403: 7613 description: "network is not eligible for services" 7614 schema: 7615 $ref: "#/definitions/ErrorResponse" 7616 409: 7617 description: "name conflicts with an existing service" 7618 schema: 7619 $ref: "#/definitions/ErrorResponse" 7620 500: 7621 description: "server error" 7622 schema: 7623 $ref: "#/definitions/ErrorResponse" 7624 503: 7625 description: "node is not part of a swarm" 7626 schema: 7627 $ref: "#/definitions/ErrorResponse" 7628 parameters: 7629 - name: "body" 7630 in: "body" 7631 required: true 7632 schema: 7633 allOf: 7634 - $ref: "#/definitions/ServiceSpec" 7635 - type: "object" 7636 example: 7637 Name: "web" 7638 TaskTemplate: 7639 ContainerSpec: 7640 Image: "nginx:alpine" 7641 Mounts: 7642 - 7643 ReadOnly: true 7644 Source: "web-data" 7645 Target: "/usr/share/nginx/html" 7646 Type: "volume" 7647 VolumeOptions: 7648 DriverConfig: {} 7649 Labels: 7650 com.example.something: "something-value" 7651 Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"] 7652 User: "33" 7653 DNSConfig: 7654 Nameservers: ["8.8.8.8"] 7655 Search: ["example.org"] 7656 Options: ["timeout:3"] 7657 Secrets: 7658 - 7659 File: 7660 Name: "www.example.org.key" 7661 UID: "33" 7662 GID: "33" 7663 Mode: 384 7664 SecretID: "fpjqlhnwb19zds35k8wn80lq9" 7665 SecretName: "example_org_domain_key" 7666 LogDriver: 7667 Name: "json-file" 7668 Options: 7669 max-file: "3" 7670 max-size: "10M" 7671 Placement: {} 7672 Resources: 7673 Limits: 7674 MemoryBytes: 104857600 7675 Reservations: {} 7676 RestartPolicy: 7677 Condition: "on-failure" 7678 Delay: 10000000000 7679 MaxAttempts: 10 7680 Mode: 7681 Replicated: 7682 Replicas: 4 7683 UpdateConfig: 7684 Parallelism: 2 7685 Delay: 1000000000 7686 FailureAction: "pause" 7687 Monitor: 15000000000 7688 MaxFailureRatio: 0.15 7689 RollbackConfig: 7690 Parallelism: 1 7691 Delay: 1000000000 7692 FailureAction: "pause" 7693 Monitor: 15000000000 7694 MaxFailureRatio: 0.15 7695 EndpointSpec: 7696 Ports: 7697 - 7698 Protocol: "tcp" 7699 PublishedPort: 8080 7700 TargetPort: 80 7701 Labels: 7702 foo: "bar" 7703 - name: "X-Registry-Auth" 7704 in: "header" 7705 description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" 7706 type: "string" 7707 tags: ["Service"] 7708 /services/{id}: 7709 get: 7710 summary: "Inspect a service" 7711 operationId: "ServiceInspect" 7712 responses: 7713 200: 7714 description: "no error" 7715 schema: 7716 $ref: "#/definitions/Service" 7717 404: 7718 description: "no such service" 7719 schema: 7720 $ref: "#/definitions/ErrorResponse" 7721 500: 7722 description: "server error" 7723 schema: 7724 $ref: "#/definitions/ErrorResponse" 7725 503: 7726 description: "node is not part of a swarm" 7727 schema: 7728 $ref: "#/definitions/ErrorResponse" 7729 parameters: 7730 - name: "id" 7731 in: "path" 7732 description: "ID or name of service." 7733 required: true 7734 type: "string" 7735 - name: "insertDefaults" 7736 in: "query" 7737 description: "Fill empty fields with default values." 7738 type: "boolean" 7739 default: false 7740 tags: ["Service"] 7741 delete: 7742 summary: "Delete a service" 7743 operationId: "ServiceDelete" 7744 responses: 7745 200: 7746 description: "no error" 7747 404: 7748 description: "no such service" 7749 schema: 7750 $ref: "#/definitions/ErrorResponse" 7751 500: 7752 description: "server error" 7753 schema: 7754 $ref: "#/definitions/ErrorResponse" 7755 503: 7756 description: "node is not part of a swarm" 7757 schema: 7758 $ref: "#/definitions/ErrorResponse" 7759 parameters: 7760 - name: "id" 7761 in: "path" 7762 description: "ID or name of service." 7763 required: true 7764 type: "string" 7765 tags: ["Service"] 7766 /services/{id}/update: 7767 post: 7768 summary: "Update a service" 7769 operationId: "ServiceUpdate" 7770 consumes: ["application/json"] 7771 produces: ["application/json"] 7772 responses: 7773 200: 7774 description: "no error" 7775 schema: 7776 $ref: "#/definitions/ServiceUpdateResponse" 7777 400: 7778 description: "bad parameter" 7779 schema: 7780 $ref: "#/definitions/ErrorResponse" 7781 404: 7782 description: "no such service" 7783 schema: 7784 $ref: "#/definitions/ErrorResponse" 7785 500: 7786 description: "server error" 7787 schema: 7788 $ref: "#/definitions/ErrorResponse" 7789 503: 7790 description: "node is not part of a swarm" 7791 schema: 7792 $ref: "#/definitions/ErrorResponse" 7793 parameters: 7794 - name: "id" 7795 in: "path" 7796 description: "ID or name of service." 7797 required: true 7798 type: "string" 7799 - name: "body" 7800 in: "body" 7801 required: true 7802 schema: 7803 allOf: 7804 - $ref: "#/definitions/ServiceSpec" 7805 - type: "object" 7806 example: 7807 Name: "top" 7808 TaskTemplate: 7809 ContainerSpec: 7810 Image: "busybox" 7811 Args: 7812 - "top" 7813 Resources: 7814 Limits: {} 7815 Reservations: {} 7816 RestartPolicy: 7817 Condition: "any" 7818 MaxAttempts: 0 7819 Placement: {} 7820 ForceUpdate: 0 7821 Mode: 7822 Replicated: 7823 Replicas: 1 7824 UpdateConfig: 7825 Parallelism: 2 7826 Delay: 1000000000 7827 FailureAction: "pause" 7828 Monitor: 15000000000 7829 MaxFailureRatio: 0.15 7830 RollbackConfig: 7831 Parallelism: 1 7832 Delay: 1000000000 7833 FailureAction: "pause" 7834 Monitor: 15000000000 7835 MaxFailureRatio: 0.15 7836 EndpointSpec: 7837 Mode: "vip" 7838 7839 - name: "version" 7840 in: "query" 7841 description: "The version number of the service object being updated. This is required to avoid conflicting writes." 7842 required: true 7843 type: "integer" 7844 - name: "registryAuthFrom" 7845 in: "query" 7846 type: "string" 7847 description: "If the X-Registry-Auth header is not specified, this 7848 parameter indicates where to find registry authorization credentials. The 7849 valid values are `spec` and `previous-spec`." 7850 default: "spec" 7851 - name: "rollback" 7852 in: "query" 7853 type: "string" 7854 description: "Set to this parameter to `previous` to cause a 7855 server-side rollback to the previous service spec. The supplied spec will be 7856 ignored in this case." 7857 - name: "X-Registry-Auth" 7858 in: "header" 7859 description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" 7860 type: "string" 7861 7862 tags: ["Service"] 7863 /services/{id}/logs: 7864 get: 7865 summary: "Get service logs" 7866 description: | 7867 Get `stdout` and `stderr` logs from a service. 7868 7869 **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers. 7870 operationId: "ServiceLogs" 7871 produces: 7872 - "application/vnd.docker.raw-stream" 7873 - "application/json" 7874 responses: 7875 101: 7876 description: "logs returned as a stream" 7877 schema: 7878 type: "string" 7879 format: "binary" 7880 200: 7881 description: "logs returned as a string in response body" 7882 schema: 7883 type: "string" 7884 404: 7885 description: "no such service" 7886 schema: 7887 $ref: "#/definitions/ErrorResponse" 7888 examples: 7889 application/json: 7890 message: "No such service: c2ada9df5af8" 7891 500: 7892 description: "server error" 7893 schema: 7894 $ref: "#/definitions/ErrorResponse" 7895 503: 7896 description: "node is not part of a swarm" 7897 schema: 7898 $ref: "#/definitions/ErrorResponse" 7899 parameters: 7900 - name: "id" 7901 in: "path" 7902 required: true 7903 description: "ID or name of the service" 7904 type: "string" 7905 - name: "details" 7906 in: "query" 7907 description: "Show service context and extra details provided to logs." 7908 type: "boolean" 7909 default: false 7910 - name: "follow" 7911 in: "query" 7912 description: | 7913 Return the logs as a stream. 7914 7915 This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). 7916 type: "boolean" 7917 default: false 7918 - name: "stdout" 7919 in: "query" 7920 description: "Return logs from `stdout`" 7921 type: "boolean" 7922 default: false 7923 - name: "stderr" 7924 in: "query" 7925 description: "Return logs from `stderr`" 7926 type: "boolean" 7927 default: false 7928 - name: "since" 7929 in: "query" 7930 description: "Only return logs since this time, as a UNIX timestamp" 7931 type: "integer" 7932 default: 0 7933 - name: "timestamps" 7934 in: "query" 7935 description: "Add timestamps to every log line" 7936 type: "boolean" 7937 default: false 7938 - name: "tail" 7939 in: "query" 7940 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." 7941 type: "string" 7942 default: "all" 7943 tags: ["Service"] 7944 /tasks: 7945 get: 7946 summary: "List tasks" 7947 operationId: "TaskList" 7948 produces: 7949 - "application/json" 7950 responses: 7951 200: 7952 description: "no error" 7953 schema: 7954 type: "array" 7955 items: 7956 $ref: "#/definitions/Task" 7957 example: 7958 - ID: "0kzzo1i0y4jz6027t0k7aezc7" 7959 Version: 7960 Index: 71 7961 CreatedAt: "2016-06-07T21:07:31.171892745Z" 7962 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 7963 Spec: 7964 ContainerSpec: 7965 Image: "redis" 7966 Resources: 7967 Limits: {} 7968 Reservations: {} 7969 RestartPolicy: 7970 Condition: "any" 7971 MaxAttempts: 0 7972 Placement: {} 7973 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 7974 Slot: 1 7975 NodeID: "60gvrl6tm78dmak4yl7srz94v" 7976 Status: 7977 Timestamp: "2016-06-07T21:07:31.290032978Z" 7978 State: "running" 7979 Message: "started" 7980 ContainerStatus: 7981 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 7982 PID: 677 7983 DesiredState: "running" 7984 NetworksAttachments: 7985 - Network: 7986 ID: "4qvuz4ko70xaltuqbt8956gd1" 7987 Version: 7988 Index: 18 7989 CreatedAt: "2016-06-07T20:31:11.912919752Z" 7990 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 7991 Spec: 7992 Name: "ingress" 7993 Labels: 7994 com.docker.swarm.internal: "true" 7995 DriverConfiguration: {} 7996 IPAMOptions: 7997 Driver: {} 7998 Configs: 7999 - Subnet: "10.255.0.0/16" 8000 Gateway: "10.255.0.1" 8001 DriverState: 8002 Name: "overlay" 8003 Options: 8004 com.docker.network.driver.overlay.vxlanid_list: "256" 8005 IPAMOptions: 8006 Driver: 8007 Name: "default" 8008 Configs: 8009 - Subnet: "10.255.0.0/16" 8010 Gateway: "10.255.0.1" 8011 Addresses: 8012 - "10.255.0.10/16" 8013 - ID: "1yljwbmlr8er2waf8orvqpwms" 8014 Version: 8015 Index: 30 8016 CreatedAt: "2016-06-07T21:07:30.019104782Z" 8017 UpdatedAt: "2016-06-07T21:07:30.231958098Z" 8018 Name: "hopeful_cori" 8019 Spec: 8020 ContainerSpec: 8021 Image: "redis" 8022 Resources: 8023 Limits: {} 8024 Reservations: {} 8025 RestartPolicy: 8026 Condition: "any" 8027 MaxAttempts: 0 8028 Placement: {} 8029 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 8030 Slot: 1 8031 NodeID: "60gvrl6tm78dmak4yl7srz94v" 8032 Status: 8033 Timestamp: "2016-06-07T21:07:30.202183143Z" 8034 State: "shutdown" 8035 Message: "shutdown" 8036 ContainerStatus: 8037 ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" 8038 DesiredState: "shutdown" 8039 NetworksAttachments: 8040 - Network: 8041 ID: "4qvuz4ko70xaltuqbt8956gd1" 8042 Version: 8043 Index: 18 8044 CreatedAt: "2016-06-07T20:31:11.912919752Z" 8045 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 8046 Spec: 8047 Name: "ingress" 8048 Labels: 8049 com.docker.swarm.internal: "true" 8050 DriverConfiguration: {} 8051 IPAMOptions: 8052 Driver: {} 8053 Configs: 8054 - Subnet: "10.255.0.0/16" 8055 Gateway: "10.255.0.1" 8056 DriverState: 8057 Name: "overlay" 8058 Options: 8059 com.docker.network.driver.overlay.vxlanid_list: "256" 8060 IPAMOptions: 8061 Driver: 8062 Name: "default" 8063 Configs: 8064 - Subnet: "10.255.0.0/16" 8065 Gateway: "10.255.0.1" 8066 Addresses: 8067 - "10.255.0.5/16" 8068 500: 8069 description: "server error" 8070 schema: 8071 $ref: "#/definitions/ErrorResponse" 8072 503: 8073 description: "node is not part of a swarm" 8074 schema: 8075 $ref: "#/definitions/ErrorResponse" 8076 parameters: 8077 - name: "filters" 8078 in: "query" 8079 type: "string" 8080 description: | 8081 A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: 8082 8083 - `desired-state=(running | shutdown | accepted)` 8084 - `id=<task id>` 8085 - `label=key` or `label="key=value"` 8086 - `name=<task name>` 8087 - `node=<node id or name>` 8088 - `service=<service name>` 8089 tags: ["Task"] 8090 /tasks/{id}: 8091 get: 8092 summary: "Inspect a task" 8093 operationId: "TaskInspect" 8094 produces: 8095 - "application/json" 8096 responses: 8097 200: 8098 description: "no error" 8099 schema: 8100 $ref: "#/definitions/Task" 8101 404: 8102 description: "no such task" 8103 schema: 8104 $ref: "#/definitions/ErrorResponse" 8105 500: 8106 description: "server error" 8107 schema: 8108 $ref: "#/definitions/ErrorResponse" 8109 503: 8110 description: "node is not part of a swarm" 8111 schema: 8112 $ref: "#/definitions/ErrorResponse" 8113 parameters: 8114 - name: "id" 8115 in: "path" 8116 description: "ID of the task" 8117 required: true 8118 type: "string" 8119 tags: ["Task"] 8120 /tasks/{id}/logs: 8121 get: 8122 summary: "Get task logs" 8123 description: | 8124 Get `stdout` and `stderr` logs from a task. 8125 8126 **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers. 8127 operationId: "TaskLogs" 8128 produces: 8129 - "application/vnd.docker.raw-stream" 8130 - "application/json" 8131 responses: 8132 101: 8133 description: "logs returned as a stream" 8134 schema: 8135 type: "string" 8136 format: "binary" 8137 200: 8138 description: "logs returned as a string in response body" 8139 schema: 8140 type: "string" 8141 404: 8142 description: "no such task" 8143 schema: 8144 $ref: "#/definitions/ErrorResponse" 8145 examples: 8146 application/json: 8147 message: "No such task: c2ada9df5af8" 8148 500: 8149 description: "server error" 8150 schema: 8151 $ref: "#/definitions/ErrorResponse" 8152 503: 8153 description: "node is not part of a swarm" 8154 schema: 8155 $ref: "#/definitions/ErrorResponse" 8156 parameters: 8157 - name: "id" 8158 in: "path" 8159 required: true 8160 description: "ID of the task" 8161 type: "string" 8162 - name: "details" 8163 in: "query" 8164 description: "Show task context and extra details provided to logs." 8165 type: "boolean" 8166 default: false 8167 - name: "follow" 8168 in: "query" 8169 description: | 8170 Return the logs as a stream. 8171 8172 This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). 8173 type: "boolean" 8174 default: false 8175 - name: "stdout" 8176 in: "query" 8177 description: "Return logs from `stdout`" 8178 type: "boolean" 8179 default: false 8180 - name: "stderr" 8181 in: "query" 8182 description: "Return logs from `stderr`" 8183 type: "boolean" 8184 default: false 8185 - name: "since" 8186 in: "query" 8187 description: "Only return logs since this time, as a UNIX timestamp" 8188 type: "integer" 8189 default: 0 8190 - name: "timestamps" 8191 in: "query" 8192 description: "Add timestamps to every log line" 8193 type: "boolean" 8194 default: false 8195 - name: "tail" 8196 in: "query" 8197 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." 8198 type: "string" 8199 default: "all" 8200 /secrets: 8201 get: 8202 summary: "List secrets" 8203 operationId: "SecretList" 8204 produces: 8205 - "application/json" 8206 responses: 8207 200: 8208 description: "no error" 8209 schema: 8210 type: "array" 8211 items: 8212 $ref: "#/definitions/Secret" 8213 example: 8214 - ID: "ktnbjxoalbkvbvedmg1urrz8h" 8215 Version: 8216 Index: 11 8217 CreatedAt: "2016-11-05T01:20:17.327670065Z" 8218 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 8219 Spec: 8220 Name: "app-dev.crt" 8221 500: 8222 description: "server error" 8223 schema: 8224 $ref: "#/definitions/ErrorResponse" 8225 503: 8226 description: "node is not part of a swarm" 8227 schema: 8228 $ref: "#/definitions/ErrorResponse" 8229 parameters: 8230 - name: "filters" 8231 in: "query" 8232 type: "string" 8233 description: | 8234 A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters: 8235 8236 - `id=<secret id>` 8237 - `label=<key> or label=<key>=value` 8238 - `name=<secret name>` 8239 - `names=<secret name>` 8240 tags: ["Secret"] 8241 /secrets/create: 8242 post: 8243 summary: "Create a secret" 8244 operationId: "SecretCreate" 8245 consumes: 8246 - "application/json" 8247 produces: 8248 - "application/json" 8249 responses: 8250 201: 8251 description: "no error" 8252 schema: 8253 type: "object" 8254 properties: 8255 ID: 8256 description: "The ID of the created secret." 8257 type: "string" 8258 example: 8259 ID: "ktnbjxoalbkvbvedmg1urrz8h" 8260 409: 8261 description: "name conflicts with an existing object" 8262 schema: 8263 $ref: "#/definitions/ErrorResponse" 8264 500: 8265 description: "server error" 8266 schema: 8267 $ref: "#/definitions/ErrorResponse" 8268 503: 8269 description: "node is not part of a swarm" 8270 schema: 8271 $ref: "#/definitions/ErrorResponse" 8272 parameters: 8273 - name: "body" 8274 in: "body" 8275 schema: 8276 allOf: 8277 - $ref: "#/definitions/SecretSpec" 8278 - type: "object" 8279 example: 8280 Name: "app-key.crt" 8281 Labels: 8282 foo: "bar" 8283 Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" 8284 tags: ["Secret"] 8285 /secrets/{id}: 8286 get: 8287 summary: "Inspect a secret" 8288 operationId: "SecretInspect" 8289 produces: 8290 - "application/json" 8291 responses: 8292 200: 8293 description: "no error" 8294 schema: 8295 $ref: "#/definitions/Secret" 8296 examples: 8297 application/json: 8298 ID: "ktnbjxoalbkvbvedmg1urrz8h" 8299 Version: 8300 Index: 11 8301 CreatedAt: "2016-11-05T01:20:17.327670065Z" 8302 UpdatedAt: "2016-11-05T01:20:17.327670065Z" 8303 Spec: 8304 Name: "app-dev.crt" 8305 404: 8306 description: "secret not found" 8307 schema: 8308 $ref: "#/definitions/ErrorResponse" 8309 500: 8310 description: "server error" 8311 schema: 8312 $ref: "#/definitions/ErrorResponse" 8313 503: 8314 description: "node is not part of a swarm" 8315 schema: 8316 $ref: "#/definitions/ErrorResponse" 8317 parameters: 8318 - name: "id" 8319 in: "path" 8320 required: true 8321 type: "string" 8322 description: "ID of the secret" 8323 tags: ["Secret"] 8324 delete: 8325 summary: "Delete a secret" 8326 operationId: "SecretDelete" 8327 produces: 8328 - "application/json" 8329 responses: 8330 204: 8331 description: "no error" 8332 404: 8333 description: "secret not found" 8334 schema: 8335 $ref: "#/definitions/ErrorResponse" 8336 500: 8337 description: "server error" 8338 schema: 8339 $ref: "#/definitions/ErrorResponse" 8340 503: 8341 description: "node is not part of a swarm" 8342 schema: 8343 $ref: "#/definitions/ErrorResponse" 8344 parameters: 8345 - name: "id" 8346 in: "path" 8347 required: true 8348 type: "string" 8349 description: "ID of the secret" 8350 tags: ["Secret"] 8351 /secrets/{id}/update: 8352 post: 8353 summary: "Update a Secret" 8354 operationId: "SecretUpdate" 8355 responses: 8356 200: 8357 description: "no error" 8358 400: 8359 description: "bad parameter" 8360 schema: 8361 $ref: "#/definitions/ErrorResponse" 8362 404: 8363 description: "no such secret" 8364 schema: 8365 $ref: "#/definitions/ErrorResponse" 8366 500: 8367 description: "server error" 8368 schema: 8369 $ref: "#/definitions/ErrorResponse" 8370 503: 8371 description: "node is not part of a swarm" 8372 schema: 8373 $ref: "#/definitions/ErrorResponse" 8374 parameters: 8375 - name: "id" 8376 in: "path" 8377 description: "The ID or name of the secret" 8378 type: "string" 8379 required: true 8380 - name: "body" 8381 in: "body" 8382 schema: 8383 $ref: "#/definitions/SecretSpec" 8384 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." 8385 - name: "version" 8386 in: "query" 8387 description: "The version number of the secret object being updated. This is required to avoid conflicting writes." 8388 type: "integer" 8389 format: "int64" 8390 required: true 8391 tags: ["Secret"] 8392 /distribution/{name}/json: 8393 get: 8394 summary: "Get image information from the registry" 8395 description: "Return image digest and platform information by contacting the registry." 8396 operationId: "DistributionInspect" 8397 produces: 8398 - "application/json" 8399 responses: 8400 200: 8401 description: "descriptor and platform information" 8402 schema: 8403 type: "object" 8404 x-go-name: DistributionInspect 8405 required: [Descriptor, Platforms] 8406 properties: 8407 Descriptor: 8408 type: "object" 8409 description: "A descriptor struct containing digest, media type, and size" 8410 properties: 8411 MediaType: 8412 type: "string" 8413 Size: 8414 type: "integer" 8415 format: "int64" 8416 Digest: 8417 type: "string" 8418 URLs: 8419 type: "array" 8420 items: 8421 type: "string" 8422 Platforms: 8423 type: "array" 8424 description: "An array containing all platforms supported by the image" 8425 items: 8426 type: "object" 8427 properties: 8428 Architecture: 8429 type: "string" 8430 OS: 8431 type: "string" 8432 OSVersion: 8433 type: "string" 8434 OSFeatures: 8435 type: "array" 8436 items: 8437 type: "string" 8438 Variant: 8439 type: "string" 8440 Features: 8441 type: "array" 8442 items: 8443 type: "string" 8444 examples: 8445 application/json: 8446 Descriptor: 8447 MediaType: "application/vnd.docker.distribution.manifest.v2+json" 8448 Digest: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96" 8449 Size: 3987495 8450 URLs: 8451 - "" 8452 Platforms: 8453 - Architecture: "amd64" 8454 OS: "linux" 8455 OSVersion: "" 8456 OSFeatures: 8457 - "" 8458 Variant: "" 8459 Features: 8460 - "" 8461 401: 8462 description: "Failed authentication or no image found" 8463 schema: 8464 $ref: "#/definitions/ErrorResponse" 8465 examples: 8466 application/json: 8467 message: "No such image: someimage (tag: latest)" 8468 500: 8469 description: "Server error" 8470 schema: 8471 $ref: "#/definitions/ErrorResponse" 8472 parameters: 8473 - name: "name" 8474 in: "path" 8475 description: "Image name or id" 8476 type: "string" 8477 required: true 8478 tags: ["Distribution"]