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