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