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