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