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