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