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