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