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