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