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