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