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