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