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