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