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