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