github.com/nullne/docker@v1.13.0-rc1/api/swagger.yaml (about) 1 swagger: "2.0" 2 schemes: 3 - "http" 4 - "https" 5 produces: 6 - "application/json" 7 - "text/plain" 8 consumes: 9 - "application/json" 10 - "text/plain" 11 basePath: "/v1.25" 12 info: 13 title: "Docker Remote API" 14 version: "1.25" 15 x-logo: 16 url: "https://docs.docker.com/images/logo-docker-main.png" 17 description: | 18 The Docker API is an HTTP REST 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. 19 20 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. [There is example of using `curl` to run a container in the SDK documentation.](#TODO) 21 22 # Errors 23 24 The Remote 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: 25 26 ``` 27 { 28 "message": "page not found" 29 } 30 ``` 31 32 # Versioning 33 34 The API is usually changed in each release of Docker. If you want to write a client that doesn't break when connecting to newer Docker releases, you can lock to a specific API version. 35 36 For Docker 1.13, the API version is 1.25. To lock to this version, you prefix the URL with `/v1.25`. For example, calling `/info` is the same as calling `/v1.25/info`. 37 38 The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons. 39 40 # Authentication 41 42 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: 43 44 ``` 45 { 46 "username": "string", 47 "password": "string", 48 "email": "string", 49 "serveraddress": "string" 50 } 51 ``` 52 53 The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. 54 55 If you have already got an identity token from the [`/auth` endpoint](#operation/checkAuthentication), you can just pass this instead of credentials: 56 57 ``` 58 { 59 "identitytoken": "9cbaf023786cd7..." 60 } 61 ``` 62 63 definitions: 64 Port: 65 type: "object" 66 description: "An open port on a container" 67 required: [PrivatePort, Type] 68 properties: 69 IP: 70 type: "string" 71 format: "ip-address" 72 PrivatePort: 73 type: "integer" 74 format: "uint16" 75 x-nullable: false 76 description: "Port on the container" 77 PublicPort: 78 type: "integer" 79 format: "uint16" 80 description: "Port exposed on the host" 81 Type: 82 type: "string" 83 x-nullable: false 84 enum: ["tcp", "udp"] 85 example: 86 PrivatePort: 8080 87 PublicPort: 80 88 Type: "tcp" 89 90 MountPoint: 91 type: "object" 92 description: "A mount point inside a container" 93 properties: 94 Type: 95 type: "string" 96 Name: 97 type: "string" 98 Source: 99 type: "string" 100 Destination: 101 type: "string" 102 Driver: 103 type: "string" 104 Mode: 105 type: "string" 106 RW: 107 type: "boolean" 108 Propagation: 109 type: "string" 110 111 DeviceMapping: 112 type: "object" 113 description: "A device mapping between the host and container" 114 properties: 115 PathOnHost: 116 type: "string" 117 PathInContainer: 118 type: "string" 119 CgroupPermissions: 120 type: "string" 121 example: 122 PathOnHost: "/dev/deviceName" 123 PathInContainer: "/dev/deviceName" 124 CgroupPermissions: "mrw" 125 126 ThrottleDevice: 127 type: "object" 128 properties: 129 Path: 130 description: "Device path" 131 type: "string" 132 Rate: 133 description: "Rate" 134 type: "integer" 135 format: "int64" 136 minimum: 0 137 138 Mount: 139 type: "object" 140 properties: 141 Target: 142 description: "Container path." 143 type: "string" 144 Source: 145 description: "Mount source (e.g. a volume name, a host path)." 146 Type: 147 description: | 148 The mount type. Available types: 149 150 - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. 151 - `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. 152 - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. 153 type: "string" 154 enum: 155 - "bind" 156 - "volume" 157 - "tmpfs" 158 ReadOnly: 159 description: "Whether the mount should be read-only." 160 type: "boolean" 161 BindOptions: 162 description: "Optional configuration for the `bind` type." 163 type: "object" 164 properties: 165 Propagation: 166 description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." 167 enum: 168 - "private" 169 - "rprivate" 170 - "shared" 171 - "rshared" 172 - "slave" 173 - "rslave" 174 VolumeOptions: 175 description: "Optional configuration for the `volume` type." 176 type: "object" 177 properties: 178 NoCopy: 179 description: "Populate volume with data from the target." 180 type: "boolean" 181 default: false 182 Labels: 183 description: "User-defined key/value metadata." 184 type: "object" 185 additionalProperties: 186 type: "string" 187 DriverConfig: 188 description: "Map of driver specific options" 189 type: "object" 190 properties: 191 Name: 192 description: "Name of the driver to use to create the volume." 193 type: "string" 194 Options: 195 description: "key/value map of driver specific options." 196 type: "object" 197 additionalProperties: 198 type: "string" 199 TmpfsOptions: 200 description: "Optional configuration for the `tmpfs` type." 201 type: "object" 202 properties: 203 SizeBytes: 204 description: "The size for the tmpfs mount in bytes." 205 type: "integer" 206 format: "int64" 207 Mode: 208 description: "The permission mode for the tmpfs mount in an integer." 209 type: "integer" 210 RestartPolicy: 211 description: | 212 The behavior to apply when the container exits. The default is not to restart. 213 214 An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. 215 type: "object" 216 properties: 217 Name: 218 type: "string" 219 description: | 220 - `always` Always restart 221 - `unless-stopped` Restart always except when the user has manually stopped the container 222 - `on-failure` Restart only when the container exit code is non-zero 223 enum: 224 - "always" 225 - "unless-stopped" 226 - "on-failure" 227 MaximumRetryCount: 228 type: "integer" 229 description: "If `on-failure` is used, the number of times to retry before giving up" 230 default: {} 231 232 Resources: 233 description: "A container's resources (cgroups config, ulimits, etc)" 234 type: "object" 235 properties: 236 # Applicable to all platforms 237 CpuShares: 238 description: "An integer value representing this container's relative CPU weight versus other containers." 239 type: "integer" 240 Memory: 241 description: "Memory limit in bytes." 242 type: "integer" 243 default: 0 244 # Applicable to UNIX platforms 245 CgroupParent: 246 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." 247 type: "string" 248 BlkioWeight: 249 description: "Block IO weight (relative weight)." 250 type: "integer" 251 minimum: 0 252 maximum: 1000 253 BlkioWeightDevice: 254 description: | 255 Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. 256 type: "array" 257 items: 258 type: "object" 259 properties: 260 Path: 261 type: "string" 262 Weight: 263 type: "integer" 264 minimum: 0 265 BlkioDeviceReadBps: 266 description: | 267 Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. 268 type: "array" 269 items: 270 $ref: "#/definitions/ThrottleDevice" 271 BlkioDeviceWriteBps: 272 description: | 273 Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. 274 type: "array" 275 items: 276 $ref: "#/definitions/ThrottleDevice" 277 BlkioDeviceReadIOps: 278 description: | 279 Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. 280 type: "array" 281 items: 282 $ref: "#/definitions/ThrottleDevice" 283 BlkioDeviceWriteIOps: 284 description: | 285 Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. 286 type: "array" 287 items: 288 $ref: "#/definitions/ThrottleDevice" 289 CpuPeriod: 290 description: "The length of a CPU period in microseconds." 291 type: "integer" 292 format: "int64" 293 CpuQuota: 294 description: "Microseconds of CPU time that the container can get in a CPU period." 295 type: "integer" 296 format: "int64" 297 CpuRealtimePeriod: 298 description: "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks." 299 type: "integer" 300 format: "int64" 301 CpuRealtimeRuntime: 302 description: "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks." 303 type: "integer" 304 format: "int64" 305 CpusetCpus: 306 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)" 307 type: "string" 308 CpusetMems: 309 description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems." 310 type: "string" 311 Devices: 312 description: "A list of devices to add to the container." 313 type: "array" 314 items: 315 $ref: "#/definitions/DeviceMapping" 316 DiskQuota: 317 description: "Disk limit (in bytes)." 318 type: "integer" 319 format: "int64" 320 KernelMemory: 321 description: "Kernel memory limit in bytes." 322 type: "integer" 323 format: "int64" 324 MemoryReservation: 325 description: "Memory soft limit in bytes." 326 type: "integer" 327 format: "int64" 328 MemorySwap: 329 description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap." 330 type: "integer" 331 format: "int64" 332 MemorySwappiness: 333 description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100." 334 type: "integer" 335 format: "int64" 336 minimum: 0 337 maximum: 100 338 NanoCPUs: 339 description: "CPU quota in units of 10<sup>-9</sup> CPUs." 340 type: "integer" 341 format: "int64" 342 OomKillDisable: 343 description: "Disable OOM Killer for the container." 344 type: "boolean" 345 PidsLimit: 346 description: "Tune a container's pids limit. Set -1 for unlimited." 347 type: "integer" 348 format: "int64" 349 Ulimits: 350 description: | 351 A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" 352 type: "array" 353 items: 354 type: "object" 355 properties: 356 Name: 357 description: "Name of ulimit" 358 type: "string" 359 Soft: 360 description: "Soft limit" 361 type: "integer" 362 Hard: 363 description: "Hard limit" 364 type: "integer" 365 # Applicable to Windows 366 CpuCount: 367 description: | 368 The number of usable CPUs (Windows only). 369 370 On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. 371 type: "integer" 372 format: "int64" 373 CpuPercent: 374 description: | 375 The usable percentage of the available CPUs (Windows only). 376 377 On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. 378 type: "integer" 379 format: "int64" 380 IOMaximumIOps: 381 description: "Maximum IOps for the container system drive (Windows only)" 382 type: "integer" 383 format: "int64" 384 IOMaximumBandwidth: 385 description: "Maximum IO in bytes per second for the container system drive (Windows only)" 386 type: "integer" 387 format: "int64" 388 389 HostConfig: 390 description: "Container configuration that depends on the host we are running on" 391 allOf: 392 - $ref: "#/definitions/Resources" 393 - type: "object" 394 properties: 395 # Applicable to all platforms 396 Binds: 397 type: "array" 398 description: | 399 A list of volume bindings for this container. Each volume binding is a string in one of these forms: 400 401 - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. 402 - `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. 403 - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. 404 - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. 405 items: 406 type: "string" 407 ContainerIDFile: 408 type: "string" 409 description: "Path to a file where the container ID is written" 410 LogConfig: 411 type: "object" 412 description: "The logging configuration for this container" 413 properties: 414 Type: 415 type: "string" 416 enum: 417 - "json-file" 418 - "syslog" 419 - "journald" 420 - "gelf" 421 - "fluentd" 422 - "awslogs" 423 - "splunk" 424 - "etwlogs" 425 - "none" 426 Config: 427 type: "object" 428 additionalProperties: 429 type: "string" 430 NetworkMode: 431 type: "string" 432 description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken 433 as a custom network's name to which this container should connect to." 434 PortBindings: 435 type: "object" 436 description: "A map of exposed container ports and the host port they should map to." 437 additionalProperties: 438 type: "object" 439 properties: 440 HostIp: 441 type: "string" 442 description: "The host IP address" 443 HostPort: 444 type: "string" 445 description: "The host port number, as a string" 446 RestartPolicy: 447 $ref: "#/definitions/RestartPolicy" 448 AutoRemove: 449 type: "boolean" 450 description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set." 451 VolumeDriver: 452 type: "string" 453 description: "Driver that this container uses to mount volumes." 454 VolumesFrom: 455 type: "array" 456 description: "A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`." 457 items: 458 type: "string" 459 Mounts: 460 description: "Specification for mounts to be added to the container." 461 type: "array" 462 items: 463 $ref: "#/definitions/Mount" 464 465 # Applicable to UNIX platforms 466 CapAdd: 467 type: "array" 468 description: "A list of kernel capabilities to add to the container." 469 items: 470 type: "string" 471 CapDrop: 472 type: "array" 473 description: "A list of kernel capabilities to drop from the container." 474 items: 475 type: "string" 476 Dns: 477 type: "array" 478 description: "A list of DNS servers for the container to use." 479 items: 480 type: "string" 481 DnsOptions: 482 type: "array" 483 description: "A list of DNS options." 484 items: 485 type: "string" 486 DnsSearch: 487 type: "array" 488 description: "A list of DNS search domains." 489 items: 490 type: "string" 491 ExtraHosts: 492 type: "array" 493 description: | 494 A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. 495 items: 496 type: "string" 497 GroupAdd: 498 type: "array" 499 description: "A list of additional groups that the container process will run as." 500 items: 501 type: "string" 502 IpcMode: 503 type: "string" 504 description: "IPC namespace to use for the container." 505 Cgroup: 506 type: "string" 507 description: "Cgroup to use for the container." 508 Links: 509 type: "array" 510 description: "A list of links for the container in the form `container_name:alias`." 511 items: 512 type: "string" 513 OomScoreAdj: 514 type: "integer" 515 description: "An integer value containing the score given to the container in order to tune OOM killer preferences." 516 PidMode: 517 type: "string" 518 description: | 519 Set the PID (Process) Namespace mode for the container. It can be either: 520 521 - `"container:<name|id>"`: joins another container's PID namespace 522 - `"host"`: use the host's PID namespace inside the container 523 Privileged: 524 type: "boolean" 525 description: "Gives the container full access to the host." 526 PublishAllPorts: 527 type: "boolean" 528 description: "Allocates a random host port for all of a container's exposed ports." 529 ReadonlyRootfs: 530 type: "boolean" 531 description: "Mount the container's root filesystem as read only." 532 SecurityOpt: 533 type: "array" 534 description: "A list of string values to customize labels for MLS 535 systems, such as SELinux." 536 items: 537 type: "string" 538 StorageOpt: 539 type: "object" 540 description: | 541 Storage driver options for this container, in the form `{"size": "120G"}`. 542 additionalProperties: 543 type: "string" 544 Tmpfs: 545 type: "object" 546 description: "List of tmpfs mounts for this container." 547 additionalProperties: 548 type: "string" 549 UTSMode: 550 type: "string" 551 description: "UTS namespace to use for the container." 552 UsernsMode: 553 type: "string" 554 description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled." 555 ShmSize: 556 type: "integer" 557 description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB." 558 minimum: 0 559 Sysctls: 560 type: "object" 561 description: | 562 A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` 563 additionalProperties: 564 type: "string" 565 Runtime: 566 type: "string" 567 description: "Runtime to use with this container." 568 # Applicable to Windows 569 ConsoleSize: 570 type: "array" 571 description: "Initial console size, as an `[height, width]` array. (Windows only)" 572 minItems: 2 573 maxItems: 2 574 items: 575 type: "integer" 576 minimum: 0 577 Isolation: 578 type: "string" 579 description: "Isolation technology of the container. (Windows only)" 580 enum: 581 - "default" 582 - "process" 583 - "hyperv" 584 585 Config: 586 description: "Configuration for a container that is portable between hosts" 587 type: "object" 588 properties: 589 Hostname: 590 description: "The hostname to use for the container, as a valid RFC 1123 hostname." 591 type: "string" 592 Domainname: 593 description: "The domain name to use for the container." 594 type: "string" 595 User: 596 description: "The user that commands are run as inside the container." 597 type: "string" 598 AttachStdin: 599 description: "Whether to attach to `stdin`." 600 type: "boolean" 601 default: false 602 AttachStdout: 603 description: "Whether to attach to `stdout`." 604 type: "boolean" 605 default: true 606 AttachStderr: 607 description: "Whether to attach to `stderr`." 608 type: "boolean" 609 default: true 610 ExposedPorts: 611 description: | 612 An object mapping ports to an empty object in the form: 613 614 `{"<port>/<tcp|udp>": {}}` 615 type: "object" 616 additionalProperties: 617 type: "object" 618 enum: 619 - {} 620 default: {} 621 Tty: 622 description: "Attach standard streams to a TTY, including `stdin` if it is not closed." 623 type: "boolean" 624 default: false 625 OpenStdin: 626 description: "Open `stdin`" 627 type: "boolean" 628 default: false 629 StdinOnce: 630 description: "Close `stdin` after one attached client disconnects" 631 type: "boolean" 632 default: false 633 Env: 634 description: | 635 A list of environment variables to set inside the container in the form `["VAR=value", ...]` 636 type: "array" 637 items: 638 type: "string" 639 Cmd: 640 description: "Command to run specified as a string or an array of strings." 641 type: 642 - "array" 643 - "string" 644 items: 645 type: "string" 646 Healthcheck: 647 description: "A test to perform to check that the container is healthy." 648 type: "object" 649 properties: 650 Test: 651 description: | 652 The test to perform. Possible values are: 653 654 - `{}` inherit healthcheck from image or parent image 655 - `{"NONE"}` disable healthcheck 656 - `{"CMD", args...}` exec arguments directly 657 - `{"CMD-SHELL", command}` run command with system's default shell 658 type: "array" 659 items: 660 type: "string" 661 Interval: 662 description: "The time to wait between checks in nanoseconds. 0 means inherit." 663 type: "integer" 664 Timeout: 665 description: "The time to wait before considering the check to have hung. 0 means inherit." 666 type: "integer" 667 Retries: 668 description: "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit." 669 type: "integer" 670 ArgsEscaped: 671 description: "Command is already escaped (Windows only)" 672 type: "boolean" 673 Image: 674 description: "The name of the image to use when creating the container" 675 type: "string" 676 Volumes: 677 description: "An object mapping mount point paths inside the container to empty objects." 678 type: "object" 679 properties: 680 additionalProperties: 681 type: "object" 682 enum: 683 - {} 684 default: {} 685 WorkingDir: 686 description: "The working directory for commands to run in." 687 type: "string" 688 Entrypoint: 689 description: | 690 The entry point for the container as a string or an array of strings. 691 692 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`). 693 type: 694 - "array" 695 - "string" 696 items: 697 type: "string" 698 NetworkDisabled: 699 description: "Disable networking for the container." 700 type: "boolean" 701 MacAddress: 702 description: "MAC address of the container." 703 type: "string" 704 OnBuild: 705 description: "`ONBUILD` metadata that were defined in the image's `Dockerfile`." 706 type: "array" 707 items: 708 type: "string" 709 Labels: 710 description: "User-defined key/value metadata." 711 type: "object" 712 additionalProperties: 713 type: "string" 714 StopSignal: 715 description: "Signal to stop a container as a string or unsigned integer." 716 type: "string" 717 default: "SIGTERM" 718 StopTimeout: 719 description: "Timeout to stop a container in seconds." 720 type: "integer" 721 default: 10 722 Shell: 723 description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell." 724 type: "array" 725 items: 726 type: "string" 727 728 NetworkConfig: 729 description: "TODO: check is correct" 730 type: "object" 731 properties: 732 Bridge: 733 type: "string" 734 Gateway: 735 type: "string" 736 Address: 737 type: "string" 738 IPPrefixLen: 739 type: "integer" 740 MacAddress: 741 type: "string" 742 PortMapping: 743 type: "string" 744 Ports: 745 type: "array" 746 items: 747 $ref: "#/definitions/Port" 748 749 GraphDriver: 750 description: "Information about this container's graph driver." 751 type: "object" 752 properties: 753 Name: 754 type: "string" 755 Data: 756 type: "object" 757 additionalProperties: 758 type: "string" 759 760 Image: 761 type: "object" 762 properties: 763 Id: 764 type: "string" 765 RepoTags: 766 type: "array" 767 items: 768 type: "string" 769 RepoDigests: 770 type: "array" 771 items: 772 type: "string" 773 Parent: 774 type: "string" 775 Comment: 776 type: "string" 777 Created: 778 type: "string" 779 Container: 780 type: "string" 781 ContainerConfig: 782 $ref: "#/definitions/Config" 783 DockerVersion: 784 type: "string" 785 Author: 786 type: "string" 787 Config: 788 $ref: "#/definitions/Config" 789 Architecture: 790 type: "string" 791 Os: 792 type: "string" 793 Size: 794 type: "integer" 795 format: "int64" 796 VirtualSize: 797 type: "integer" 798 format: "int64" 799 GraphDriver: 800 $ref: "#/definitions/GraphDriver" 801 RootFS: 802 type: "object" 803 properties: 804 Type: 805 type: "string" 806 Layers: 807 type: "array" 808 items: 809 type: "string" 810 BaseLayer: 811 type: "string" 812 813 ImageSummary: 814 type: "object" 815 required: 816 - Id 817 - ParentId 818 - RepoTags 819 - RepoDigests 820 - Created 821 - Size 822 - SharedSize 823 - VirtualSize 824 - Labels 825 - Containers 826 properties: 827 Id: 828 type: "string" 829 x-nullable: false 830 ParentId: 831 type: "string" 832 x-nullable: false 833 RepoTags: 834 type: "array" 835 x-nullable: false 836 items: 837 type: "string" 838 RepoDigests: 839 type: "array" 840 x-nullable: false 841 items: 842 type: "string" 843 Created: 844 type: "integer" 845 x-nullable: false 846 Size: 847 type: "integer" 848 x-nullable: false 849 SharedSize: 850 type: "integer" 851 x-nullable: false 852 VirtualSize: 853 type: "integer" 854 x-nullable: false 855 Labels: 856 type: "object" 857 x-nullable: false 858 additionalProperties: 859 type: "string" 860 Containers: 861 x-nullable: false 862 type: "integer" 863 864 AuthConfig: 865 type: "object" 866 properties: 867 username: 868 type: "string" 869 password: 870 type: "string" 871 email: 872 type: "string" 873 serveraddress: 874 type: "string" 875 example: 876 username: "hannibal" 877 password: "xxxx" 878 serveraddress: "https://index.docker.io/v1/" 879 880 ProcessConfig: 881 type: "object" 882 properties: 883 privileged: 884 type: "boolean" 885 user: 886 type: "string" 887 tty: 888 type: "boolean" 889 entrypoint: 890 type: "string" 891 arguments: 892 type: "array" 893 items: 894 type: "string" 895 896 Volume: 897 type: "object" 898 required: [Name, Driver, Mountpoint, Labels, Scope, Options] 899 properties: 900 Name: 901 type: "string" 902 description: "Name of the volume." 903 x-nullable: false 904 Driver: 905 type: "string" 906 description: "Name of the volume driver used by the volume." 907 x-nullable: false 908 Mountpoint: 909 type: "string" 910 description: "Mount path of the volume on the host." 911 x-nullable: false 912 Status: 913 type: "object" 914 description: | 915 Low-level details about the volume, provided by the volume driver. 916 Details are returned as a map with key/value pairs: 917 `{"key":"value","key2":"value2"}`. 918 919 The `Status` field is optional, and is omitted if the volume driver 920 does not support this feature. 921 additionalProperties: 922 type: "object" 923 Labels: 924 type: "object" 925 description: "User-defined key/value metadata." 926 x-nullable: false 927 additionalProperties: 928 type: "string" 929 Scope: 930 type: "string" 931 description: "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level." 932 default: "local" 933 x-nullable: false 934 enum: ["local", "global"] 935 Options: 936 type: "object" 937 description: "The driver specific options used when creating the volume." 938 additionalProperties: 939 type: "string" 940 UsageData: 941 type: "object" 942 required: [Size, RefCount] 943 properties: 944 Size: 945 type: "integer" 946 description: "The disk space used by the volume (local driver only)" 947 default: -1 948 x-nullable: false 949 RefCount: 950 type: "integer" 951 default: -1 952 description: "The number of containers referencing this volume." 953 x-nullable: false 954 955 example: 956 Name: "tardis" 957 Driver: "custom" 958 Mountpoint: "/var/lib/docker/volumes/tardis" 959 Status: 960 hello: "world" 961 Labels: 962 com.example.some-label: "some-value" 963 com.example.some-other-label: "some-other-value" 964 Scope: "local" 965 966 Network: 967 type: "object" 968 properties: 969 Name: 970 type: "string" 971 Id: 972 type: "string" 973 Created: 974 type: "string" 975 format: "dateTime" 976 Scope: 977 type: "string" 978 Driver: 979 type: "string" 980 EnableIPv6: 981 type: "boolean" 982 IPAM: 983 $ref: "#/definitions/IPAM" 984 Internal: 985 type: "boolean" 986 Containers: 987 type: "object" 988 additionalProperties: 989 $ref: "#/definitions/NetworkContainer" 990 Options: 991 type: "object" 992 additionalProperties: 993 type: "string" 994 Labels: 995 type: "object" 996 additionalProperties: 997 type: "string" 998 example: 999 Name: "net01" 1000 Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" 1001 Created: "2016-10-19T04:33:30.360899459Z" 1002 Scope: "local" 1003 Driver: "bridge" 1004 EnableIPv6: false 1005 IPAM: 1006 Driver: "default" 1007 Config: 1008 - Subnet: "172.19.0.0/16" 1009 Gateway: "172.19.0.1" 1010 Options: 1011 foo: "bar" 1012 Internal: false 1013 Containers: 1014 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: 1015 Name: "test" 1016 EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" 1017 MacAddress: "02:42:ac:13:00:02" 1018 IPv4Address: "172.19.0.2/16" 1019 IPv6Address: "" 1020 Options: 1021 com.docker.network.bridge.default_bridge: "true" 1022 com.docker.network.bridge.enable_icc: "true" 1023 com.docker.network.bridge.enable_ip_masquerade: "true" 1024 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 1025 com.docker.network.bridge.name: "docker0" 1026 com.docker.network.driver.mtu: "1500" 1027 Labels: 1028 com.example.some-label: "some-value" 1029 com.example.some-other-label: "some-other-value" 1030 IPAM: 1031 type: "object" 1032 properties: 1033 Driver: 1034 description: "Name of the IPAM driver to use." 1035 type: "string" 1036 default: "default" 1037 Config: 1038 description: "List of IPAM configuration options, specified as a map: `{\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>}`" 1039 type: "array" 1040 items: 1041 type: "object" 1042 additionalProperties: 1043 type: "string" 1044 Options: 1045 description: "Driver-specific options, specified as a map." 1046 type: "array" 1047 items: 1048 type: "object" 1049 additionalProperties: 1050 type: "string" 1051 NetworkContainer: 1052 type: "object" 1053 properties: 1054 EndpointID: 1055 type: "string" 1056 MacAddress: 1057 type: "string" 1058 IPv4Address: 1059 type: "string" 1060 IPv6Address: 1061 type: "string" 1062 1063 BuildInfo: 1064 type: "object" 1065 properties: 1066 id: 1067 type: "string" 1068 stream: 1069 type: "string" 1070 error: 1071 type: "string" 1072 errorDetail: 1073 $ref: "#/definitions/ErrorDetail" 1074 status: 1075 type: "string" 1076 progress: 1077 type: "string" 1078 progressDetail: 1079 $ref: "#/definitions/ProgressDetail" 1080 1081 CreateImageInfo: 1082 type: "object" 1083 properties: 1084 error: 1085 type: "string" 1086 status: 1087 type: "string" 1088 progress: 1089 type: "string" 1090 progressDetail: 1091 $ref: "#/definitions/ProgressDetail" 1092 1093 PushImageInfo: 1094 type: "object" 1095 properties: 1096 error: 1097 type: "string" 1098 status: 1099 type: "string" 1100 progress: 1101 type: "string" 1102 progressDetail: 1103 $ref: "#/definitions/ProgressDetail" 1104 ErrorDetail: 1105 type: "object" 1106 properties: 1107 code: 1108 type: "integer" 1109 message: 1110 type: "string" 1111 ProgressDetail: 1112 type: "object" 1113 properties: 1114 code: 1115 type: "integer" 1116 message: 1117 type: "integer" 1118 1119 ErrorResponse: 1120 description: "Represents an error." 1121 type: "object" 1122 required: ["message"] 1123 properties: 1124 message: 1125 description: "The error message." 1126 type: "string" 1127 x-nullable: false 1128 example: 1129 message: "Something went wrong." 1130 1131 IdResponse: 1132 description: "Response to an API call that returns just an Id" 1133 type: "object" 1134 required: ["Id"] 1135 properties: 1136 Id: 1137 description: "The id of the newly created object." 1138 type: "string" 1139 x-nullable: false 1140 1141 EndpointSettings: 1142 description: "Configuration for a network endpoint." 1143 type: "object" 1144 properties: 1145 IPAMConfig: 1146 description: "IPAM configurations for the endpoint" 1147 type: "object" 1148 properties: 1149 IPv4Address: 1150 type: "string" 1151 IPv6Address: 1152 type: "string" 1153 LinkLocalIPs: 1154 type: "array" 1155 items: 1156 type: "string" 1157 Links: 1158 type: "array" 1159 items: 1160 type: "string" 1161 Aliases: 1162 type: "array" 1163 items: 1164 type: "string" 1165 NetworkID: 1166 type: "string" 1167 EndpointID: 1168 type: "string" 1169 Gateway: 1170 type: "string" 1171 IPAddress: 1172 type: "string" 1173 IPPrefixLen: 1174 type: "integer" 1175 IPv6Gateway: 1176 type: "string" 1177 GlobalIPv6Address: 1178 type: "string" 1179 GlobalIPv6PrefixLen: 1180 type: "integer" 1181 format: "int64" 1182 MacAddress: 1183 type: "string" 1184 1185 PluginMount: 1186 type: "object" 1187 x-nullable: false 1188 required: [Name, Description, Settable, Source, Destination, Type, Options] 1189 properties: 1190 Name: 1191 type: "string" 1192 x-nullable: false 1193 Description: 1194 type: "string" 1195 x-nullable: false 1196 Settable: 1197 type: "array" 1198 items: 1199 type: "string" 1200 Source: 1201 type: "string" 1202 Destination: 1203 type: "string" 1204 x-nullable: false 1205 Type: 1206 type: "string" 1207 x-nullable: false 1208 Options: 1209 type: "array" 1210 items: 1211 type: "string" 1212 1213 PluginDevice: 1214 type: "object" 1215 required: [Name, Description, Settable, Path] 1216 x-nullable: false 1217 properties: 1218 Name: 1219 type: "string" 1220 x-nullable: false 1221 Description: 1222 type: "string" 1223 x-nullable: false 1224 Settable: 1225 type: "array" 1226 items: 1227 type: "string" 1228 Path: 1229 type: "string" 1230 1231 PluginEnv: 1232 type: "object" 1233 x-nullable: false 1234 required: [Name, Description, Settable, Value] 1235 properties: 1236 Name: 1237 x-nullable: false 1238 type: "string" 1239 Description: 1240 x-nullable: false 1241 type: "string" 1242 Settable: 1243 type: "array" 1244 items: 1245 type: "string" 1246 Value: 1247 type: "string" 1248 1249 PluginInterfaceType: 1250 type: "object" 1251 x-nullable: false 1252 required: [Prefix, Capability, Version] 1253 properties: 1254 Prefix: 1255 type: "string" 1256 x-nullable: false 1257 Capability: 1258 type: "string" 1259 x-nullable: false 1260 Version: 1261 type: "string" 1262 x-nullable: false 1263 1264 Plugin: 1265 description: "A plugin for the Remote API" 1266 type: "object" 1267 required: [Settings, Enabled, Config, Name, Tag] 1268 properties: 1269 Id: 1270 type: "string" 1271 Name: 1272 type: "string" 1273 x-nullable: false 1274 Tag: 1275 type: "string" 1276 x-nullable: false 1277 Enabled: 1278 description: "True when the plugin is running. False when the plugin is not running, only installed." 1279 type: "boolean" 1280 x-nullable: false 1281 Settings: 1282 description: "Settings that can be modified by users." 1283 type: "object" 1284 x-nullable: false 1285 required: [Args, Devices, Env, Mounts] 1286 properties: 1287 Mounts: 1288 type: "array" 1289 items: 1290 $ref: "#/definitions/PluginMount" 1291 Env: 1292 type: "array" 1293 items: 1294 type: "string" 1295 Args: 1296 type: "array" 1297 items: 1298 type: "string" 1299 Devices: 1300 type: "array" 1301 items: 1302 $ref: "#/definitions/PluginDevice" 1303 Config: 1304 description: "The config of a plugin." 1305 type: "object" 1306 x-nullable: false 1307 required: 1308 - Description 1309 - Documentation 1310 - Interface 1311 - Entrypoint 1312 - Workdir 1313 - Network 1314 - Capabilities 1315 - Mounts 1316 - Devices 1317 - Env 1318 - Args 1319 properties: 1320 Description: 1321 type: "string" 1322 x-nullable: false 1323 Documentation: 1324 type: "string" 1325 x-nullable: false 1326 Interface: 1327 description: "The interface between Docker and the plugin" 1328 x-nullable: false 1329 type: "object" 1330 required: [Types, Socket] 1331 properties: 1332 Types: 1333 type: "array" 1334 items: 1335 $ref: "#/definitions/PluginInterfaceType" 1336 Socket: 1337 type: "string" 1338 x-nullable: false 1339 Entrypoint: 1340 type: "array" 1341 items: 1342 type: "string" 1343 Workdir: 1344 type: "string" 1345 x-nullable: false 1346 User: 1347 type: "object" 1348 x-nullable: false 1349 properties: 1350 UID: 1351 type: "integer" 1352 format: "uint32" 1353 GID: 1354 type: "integer" 1355 format: "uint32" 1356 Network: 1357 type: "object" 1358 x-nullable: false 1359 required: [Type] 1360 properties: 1361 Type: 1362 x-nullable: false 1363 type: "string" 1364 Capabilities: 1365 type: "array" 1366 items: 1367 type: "string" 1368 Mounts: 1369 type: "array" 1370 items: 1371 $ref: "#/definitions/PluginMount" 1372 Devices: 1373 type: "array" 1374 items: 1375 $ref: "#/definitions/PluginDevice" 1376 Env: 1377 type: "array" 1378 items: 1379 $ref: "#/definitions/PluginEnv" 1380 Args: 1381 type: "object" 1382 x-nullable: false 1383 required: [Name, Description, Settable, Value] 1384 properties: 1385 Name: 1386 x-nullable: false 1387 type: "string" 1388 Description: 1389 x-nullable: false 1390 type: "string" 1391 Settable: 1392 type: "array" 1393 items: 1394 type: "string" 1395 Value: 1396 type: "array" 1397 items: 1398 type: "string" 1399 example: 1400 Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" 1401 Name: "tiborvass/no-remove" 1402 Tag: "latest" 1403 Active: true 1404 Config: 1405 Mounts: 1406 - Name: "" 1407 Description: "" 1408 Settable: null 1409 Source: "/data" 1410 Destination: "/data" 1411 Type: "bind" 1412 Options: 1413 - "shared" 1414 - "rbind" 1415 - Name: "" 1416 Description: "" 1417 Settable: null 1418 Source: null 1419 Destination: "/foobar" 1420 Type: "tmpfs" 1421 Options: null 1422 Env: 1423 - "DEBUG=1" 1424 Args: null 1425 Devices: null 1426 Manifest: 1427 ManifestVersion: "v0" 1428 Description: "A test plugin for Docker" 1429 Documentation: "https://docs.docker.com/engine/extend/plugins/" 1430 Interface: 1431 Types: 1432 - "docker.volumedriver/1.0" 1433 Socket: "plugins.sock" 1434 Entrypoint: 1435 - "plugin-no-remove" 1436 - "/data" 1437 Workdir: "" 1438 User: {} 1439 Network: 1440 Type: "host" 1441 Capabilities: null 1442 Mounts: 1443 - Name: "" 1444 Description: "" 1445 Settable: null 1446 Source: "/data" 1447 Destination: "/data" 1448 Type: "bind" 1449 Options: 1450 - "shared" 1451 - "rbind" 1452 - Name: "" 1453 Description: "" 1454 Settable: null 1455 Source: null 1456 Destination: "/foobar" 1457 Type: "tmpfs" 1458 Options: null 1459 Devices: 1460 - Name: "device" 1461 Description: "a host device to mount" 1462 Settable: null 1463 Path: "/dev/cpu_dma_latency" 1464 Env: 1465 - Name: "DEBUG" 1466 Description: "If set, prints debug messages" 1467 Settable: null 1468 Value: "1" 1469 Args: 1470 Name: "args" 1471 Description: "command line arguments" 1472 Settable: null 1473 Value: [] 1474 1475 NodeSpec: 1476 type: "object" 1477 properties: 1478 Name: 1479 description: "Name for the node." 1480 type: "string" 1481 Labels: 1482 description: "User-defined key/value metadata." 1483 type: "object" 1484 additionalProperties: 1485 type: "string" 1486 Role: 1487 description: "Role of the node." 1488 type: "string" 1489 enum: 1490 - "worker" 1491 - "manager" 1492 Availability: 1493 description: "Availability of the node." 1494 type: "string" 1495 enum: 1496 - "active" 1497 - "pause" 1498 - "drain" 1499 example: 1500 Availability: "active" 1501 Name: "node-name" 1502 Role: "manager" 1503 Labels: 1504 foo: "bar" 1505 Node: 1506 type: "object" 1507 properties: 1508 ID: 1509 type: "string" 1510 Version: 1511 type: "object" 1512 properties: 1513 Index: 1514 type: "integer" 1515 format: "int64" 1516 CreatedAt: 1517 type: "string" 1518 format: "dateTime" 1519 UpdatedAt: 1520 type: "string" 1521 format: "dateTime" 1522 Spec: 1523 $ref: "#/definitions/NodeSpec" 1524 Description: 1525 type: "object" 1526 properties: 1527 Hostname: 1528 type: "string" 1529 Platform: 1530 type: "object" 1531 properties: 1532 Architecture: 1533 type: "string" 1534 OS: 1535 type: "string" 1536 Resources: 1537 type: "object" 1538 properties: 1539 NanoCPUs: 1540 type: "integer" 1541 format: "int64" 1542 MemoryBytes: 1543 type: "integer" 1544 format: "int64" 1545 Engine: 1546 type: "object" 1547 properties: 1548 EngineVersion: 1549 type: "string" 1550 Labels: 1551 type: "object" 1552 additionalProperties: 1553 type: "string" 1554 Plugins: 1555 type: "array" 1556 items: 1557 type: "object" 1558 properties: 1559 Type: 1560 type: "string" 1561 Name: 1562 type: "string" 1563 example: 1564 ID: "24ifsmvkjbyhk" 1565 Version: 1566 Index: 8 1567 CreatedAt: "2016-06-07T20:31:11.853781916Z" 1568 UpdatedAt: "2016-06-07T20:31:11.999868824Z" 1569 Spec: 1570 Name: "my-node" 1571 Role: "manager" 1572 Availability: "active" 1573 Labels: 1574 foo: "bar" 1575 Description: 1576 Hostname: "bf3067039e47" 1577 Platform: 1578 Architecture: "x86_64" 1579 OS: "linux" 1580 Resources: 1581 NanoCPUs: 4000000000 1582 MemoryBytes: 8272408576 1583 Engine: 1584 EngineVersion: "1.13.0" 1585 Labels: 1586 foo: "bar" 1587 Plugins: 1588 - Type: "Volume" 1589 Name: "local" 1590 - Type: "Network" 1591 Name: "bridge" 1592 - Type: "Network" 1593 Name: "null" 1594 - Type: "Network" 1595 Name: "overlay" 1596 Status: 1597 State: "ready" 1598 Addr: "172.17.0.2" 1599 ManagerStatus: 1600 Leader: true 1601 Reachability: "reachable" 1602 Addr: "172.17.0.2:2377" 1603 SwarmSpec: 1604 description: "User modifiable swarm configuration." 1605 type: "object" 1606 properties: 1607 Name: 1608 description: "Name of the swarm." 1609 type: "string" 1610 Labels: 1611 description: "User-defined key/value metadata." 1612 type: "object" 1613 additionalProperties: 1614 type: "string" 1615 Orchestration: 1616 description: "Orchestration configuration." 1617 type: "object" 1618 properties: 1619 TaskHistoryRetentionLimit: 1620 description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks." 1621 type: "integer" 1622 format: "int64" 1623 Raft: 1624 description: "Raft configuration." 1625 type: "object" 1626 properties: 1627 SnapshotInterval: 1628 description: "The number of log entries between snapshots." 1629 type: "integer" 1630 format: "int64" 1631 KeepOldSnapshots: 1632 description: "The number of snapshots to keep beyond the current snapshot." 1633 type: "integer" 1634 format: "int64" 1635 LogEntriesForSlowFollowers: 1636 description: "The number of log entries to keep around to sync up slow followers after a snapshot is created." 1637 type: "integer" 1638 format: "int64" 1639 ElectionTick: 1640 description: | 1641 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`. 1642 1643 A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. 1644 type: "integer" 1645 HeartbeatTick: 1646 description: | 1647 The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. 1648 1649 A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. 1650 type: "integer" 1651 Dispatcher: 1652 description: "Dispatcher configuration." 1653 type: "object" 1654 properties: 1655 HeartbeatPeriod: 1656 description: "The delay for an agent to send a heartbeat to the dispatcher." 1657 type: "integer" 1658 format: "int64" 1659 CAConfig: 1660 description: "CA configuration." 1661 type: "object" 1662 properties: 1663 NodeCertExpiry: 1664 description: "The duration node certificates are issued for." 1665 type: "integer" 1666 format: "int64" 1667 ExternalCAs: 1668 description: "Configuration for forwarding signing requests to an external certificate authority." 1669 type: "array" 1670 items: 1671 type: "object" 1672 properties: 1673 Protocol: 1674 description: "Protocol for communication with the external CA (currently only `cfssl` is supported)." 1675 type: "string" 1676 enum: 1677 - "cfssl" 1678 default: "cfssl" 1679 URL: 1680 description: "URL where certificate signing requests should be sent." 1681 type: "string" 1682 Options: 1683 description: "An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver." 1684 type: "object" 1685 additionalProperties: 1686 type: "string" 1687 TaskDefaults: 1688 description: "Defaults for creating tasks in this cluster." 1689 type: "object" 1690 properties: 1691 LogDriver: 1692 description: | 1693 The log driver to use for tasks created in the orchestrator if unspecified by a service. 1694 1695 Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. 1696 type: "object" 1697 properties: 1698 Name: 1699 type: "string" 1700 Options: 1701 type: "object" 1702 additionalProperties: 1703 type: "string" 1704 example: 1705 Name: "default" 1706 Orchestration: 1707 TaskHistoryRetentionLimit: 10 1708 Raft: 1709 SnapshotInterval: 10000 1710 LogEntriesForSlowFollowers: 500 1711 HeartbeatTick: 1 1712 ElectionTick: 3 1713 Dispatcher: 1714 HeartbeatPeriod: 5000000000 1715 CAConfig: 1716 NodeCertExpiry: 7776000000000000 1717 JoinTokens: 1718 Worker: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" 1719 Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 1720 # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but 1721 # without `JoinTokens`. 1722 ClusterInfo: 1723 type: "object" 1724 properties: 1725 ID: 1726 description: "The ID of the swarm." 1727 type: "string" 1728 Version: 1729 type: "object" 1730 properties: 1731 Index: 1732 type: "integer" 1733 format: "int64" 1734 CreatedAt: 1735 type: "string" 1736 format: "dateTime" 1737 UpdatedAt: 1738 type: "string" 1739 format: "dateTime" 1740 Spec: 1741 $ref: "#/definitions/SwarmSpec" 1742 TaskSpec: 1743 description: "User modifiable task configuration." 1744 type: "object" 1745 properties: 1746 ContainerSpec: 1747 type: "object" 1748 properties: 1749 Image: 1750 description: "The image name to use for the container." 1751 type: "string" 1752 Command: 1753 description: "The command to be run in the image." 1754 type: "array" 1755 items: 1756 type: "string" 1757 Args: 1758 description: "Arguments to the command." 1759 type: "array" 1760 items: 1761 type: "string" 1762 Env: 1763 description: "A list of environment variables in the form `VAR=value`." 1764 type: "array" 1765 items: 1766 type: "string" 1767 Dir: 1768 description: "The working directory for commands to run in." 1769 type: "string" 1770 User: 1771 description: "The user inside the container." 1772 type: "string" 1773 Labels: 1774 description: "User-defined key/value data." 1775 type: "object" 1776 additionalProperties: 1777 type: "string" 1778 TTY: 1779 description: "Whether a pseudo-TTY should be allocated." 1780 type: "boolean" 1781 Mounts: 1782 description: "Specification for mounts to be added to containers created as part of the service." 1783 type: "array" 1784 items: 1785 $ref: "#/definitions/Mount" 1786 StopGracePeriod: 1787 description: "Amount of time to wait for the container to terminate before forcefully killing it." 1788 type: "integer" 1789 format: "int64" 1790 Resources: 1791 description: "Resource requirements which apply to each individual container created as part of the service." 1792 type: "object" 1793 properties: 1794 Limits: 1795 description: "Define resources limits." 1796 type: "object" 1797 properties: 1798 NanoCPUs: 1799 description: "CPU limit in units of 10<sup>-9</sup> CPU shares." 1800 type: "integer" 1801 format: "int64" 1802 MemoryBytes: 1803 description: "Memory limit in Bytes." 1804 type: "integer" 1805 format: "int64" 1806 Reservation: 1807 description: "Define resources reservation." 1808 properties: 1809 NanoCPUs: 1810 description: "CPU reservation in units of 10<sup>-9</sup> CPU shares." 1811 type: "integer" 1812 format: "int64" 1813 MemoryBytes: 1814 description: "Memory reservation in Bytes." 1815 type: "integer" 1816 format: "int64" 1817 RestartPolicy: 1818 description: "Specification for the restart policy which applies to containers created as part of this service." 1819 type: "object" 1820 properties: 1821 Condition: 1822 description: "Condition for restart." 1823 type: "string" 1824 enum: 1825 - "none" 1826 - "on-failure" 1827 - "any" 1828 Delay: 1829 description: "Delay between restart attempts." 1830 type: "integer" 1831 format: "int64" 1832 MaxAttempts: 1833 description: "Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)." 1834 type: "integer" 1835 format: "int64" 1836 default: 0 1837 Window: 1838 description: "Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded)." 1839 type: "integer" 1840 format: "int64" 1841 default: 0 1842 Placement: 1843 type: "object" 1844 properties: 1845 Constraints: 1846 description: "An array of constraints." 1847 type: "array" 1848 items: 1849 type: "string" 1850 ForceUpdate: 1851 description: "A counter that triggers an update even if no relevant parameters have been changed." 1852 type: "integer" 1853 Networks: 1854 type: "array" 1855 items: 1856 type: "object" 1857 properties: 1858 Target: 1859 type: "string" 1860 Aliases: 1861 type: "array" 1862 items: 1863 type: "string" 1864 LogDriver: 1865 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." 1866 type: "object" 1867 properties: 1868 Name: 1869 type: "string" 1870 Options: 1871 type: "object" 1872 additionalProperties: 1873 type: "string" 1874 TaskState: 1875 type: "string" 1876 enum: 1877 - "new" 1878 - "allocated" 1879 - "pending" 1880 - "assigned" 1881 - "accepted" 1882 - "preparing" 1883 - "ready" 1884 - "starting" 1885 - "running" 1886 - "complete" 1887 - "shutdown" 1888 - "failed" 1889 - "rejected" 1890 Task: 1891 type: "object" 1892 properties: 1893 ID: 1894 description: "The ID of the task." 1895 type: "string" 1896 Version: 1897 type: "object" 1898 properties: 1899 Index: 1900 type: "integer" 1901 format: "int64" 1902 CreatedAt: 1903 type: "string" 1904 format: "dateTime" 1905 UpdatedAt: 1906 type: "string" 1907 format: "dateTime" 1908 Name: 1909 description: "Name of the task." 1910 type: "string" 1911 Labels: 1912 description: "User-defined key/value metadata." 1913 type: "object" 1914 additionalProperties: 1915 type: "string" 1916 Spec: 1917 $ref: "#/definitions/TaskSpec" 1918 ServiceID: 1919 description: "The ID of the service this task is part of." 1920 type: "string" 1921 Slot: 1922 type: "integer" 1923 NodeID: 1924 description: "The ID of the node that this task is on." 1925 type: "string" 1926 Status: 1927 type: "object" 1928 properties: 1929 Timestamp: 1930 type: "string" 1931 format: "dateTime" 1932 State: 1933 $ref: "#/definitions/TaskState" 1934 Message: 1935 type: "string" 1936 Err: 1937 type: "string" 1938 ContainerStatus: 1939 type: "object" 1940 properties: 1941 ContainerID: 1942 type: "string" 1943 PID: 1944 type: "integer" 1945 ExitCode: 1946 type: "integer" 1947 DesiredState: 1948 $ref: "#/definitions/TaskState" 1949 example: 1950 ID: "0kzzo1i0y4jz6027t0k7aezc7" 1951 Version: 1952 Index: 71 1953 CreatedAt: "2016-06-07T21:07:31.171892745Z" 1954 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 1955 Spec: 1956 ContainerSpec: 1957 Image: "redis" 1958 Resources: 1959 Limits: {} 1960 Reservations: {} 1961 RestartPolicy: 1962 Condition: "any" 1963 MaxAttempts: 0 1964 Placement: {} 1965 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 1966 Slot: 1 1967 NodeID: "60gvrl6tm78dmak4yl7srz94v" 1968 Status: 1969 Timestamp: "2016-06-07T21:07:31.290032978Z" 1970 State: "running" 1971 Message: "started" 1972 ContainerStatus: 1973 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 1974 PID: 677 1975 DesiredState: "running" 1976 NetworksAttachments: 1977 - Network: 1978 ID: "4qvuz4ko70xaltuqbt8956gd1" 1979 Version: 1980 Index: 18 1981 CreatedAt: "2016-06-07T20:31:11.912919752Z" 1982 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 1983 Spec: 1984 Name: "ingress" 1985 Labels: 1986 com.docker.swarm.internal: "true" 1987 DriverConfiguration: {} 1988 IPAMOptions: 1989 Driver: {} 1990 Configs: 1991 - Subnet: "10.255.0.0/16" 1992 Gateway: "10.255.0.1" 1993 DriverState: 1994 Name: "overlay" 1995 Options: 1996 com.docker.network.driver.overlay.vxlanid_list: "256" 1997 IPAMOptions: 1998 Driver: 1999 Name: "default" 2000 Configs: 2001 - Subnet: "10.255.0.0/16" 2002 Gateway: "10.255.0.1" 2003 Addresses: 2004 - "10.255.0.10/16" 2005 ServiceSpec: 2006 description: "User modifiable configuration for a service." 2007 properties: 2008 Name: 2009 description: "Name of the service." 2010 type: "string" 2011 Labels: 2012 description: "User-defined key/value metadata." 2013 type: "object" 2014 additionalProperties: 2015 type: "string" 2016 TaskTemplate: 2017 $ref: "#/definitions/TaskSpec" 2018 Mode: 2019 description: "Scheduling mode for the service." 2020 type: "object" 2021 properties: 2022 Replicated: 2023 type: "object" 2024 properties: 2025 Replicas: 2026 type: "integer" 2027 format: "int64" 2028 Global: 2029 type: "object" 2030 UpdateConfig: 2031 description: "Specification for the update strategy of the service." 2032 type: "object" 2033 properties: 2034 Parallelism: 2035 description: "Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism)." 2036 type: "integer" 2037 format: "int64" 2038 Delay: 2039 description: "Amount of time between updates, in nanoseconds." 2040 type: "integer" 2041 format: "int64" 2042 FailureAction: 2043 description: "Action to take if an updated task fails to run, or stops running during the update." 2044 type: "string" 2045 enum: 2046 - "continue" 2047 - "pause" 2048 Monitor: 2049 description: "Amount of time to monitor each updated task for failures, in nanoseconds." 2050 type: "integer" 2051 format: "int64" 2052 MaxFailureRatio: 2053 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." 2054 type: "number" 2055 default: 0 2056 Networks: 2057 description: "Array of network names or IDs to attach the service to." 2058 type: "array" 2059 items: 2060 type: "object" 2061 properties: 2062 Target: 2063 type: "string" 2064 Aliases: 2065 type: "array" 2066 items: 2067 type: "string" 2068 EndpointSpec: 2069 $ref: "#/definitions/EndpointSpec" 2070 EndpointPortConfig: 2071 type: "object" 2072 properties: 2073 Name: 2074 type: "string" 2075 Protocol: 2076 type: "string" 2077 enum: 2078 - "tcp" 2079 - "udp" 2080 TargetPort: 2081 description: "The port inside the container." 2082 type: "integer" 2083 PublishedPort: 2084 description: "The port on the swarm hosts." 2085 type: "integer" 2086 EndpointSpec: 2087 description: "Properties that can be configured to access and load balance a service." 2088 type: "object" 2089 properties: 2090 Mode: 2091 description: "The mode of resolution to use for internal load balancing 2092 between tasks." 2093 type: "string" 2094 enum: 2095 - "vip" 2096 - "dnsrr" 2097 default: "vip" 2098 Ports: 2099 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." 2100 type: "array" 2101 items: 2102 $ref: "#/definitions/EndpointPortConfig" 2103 Service: 2104 type: "object" 2105 properties: 2106 ID: 2107 type: "string" 2108 Version: 2109 type: "object" 2110 properties: 2111 Index: 2112 type: "integer" 2113 format: "int64" 2114 CreatedAt: 2115 type: "string" 2116 format: "dateTime" 2117 UpdatedAt: 2118 type: "string" 2119 format: "dateTime" 2120 Spec: 2121 $ref: "#/definitions/ServiceSpec" 2122 Endpoint: 2123 type: "object" 2124 properties: 2125 Spec: 2126 $ref: "#/definitions/EndpointSpec" 2127 Ports: 2128 type: "array" 2129 items: 2130 $ref: "#/definitions/EndpointPortConfig" 2131 VirtualIPs: 2132 type: "array" 2133 items: 2134 type: "object" 2135 properties: 2136 NetworkID: 2137 type: "string" 2138 Addr: 2139 type: "string" 2140 UpdateStatus: 2141 description: "The status of a service update." 2142 type: "object" 2143 properties: 2144 State: 2145 type: "string" 2146 enum: 2147 - "updating" 2148 - "paused" 2149 - "completed" 2150 StartedAt: 2151 type: "string" 2152 format: "dateTime" 2153 CompletedAt: 2154 type: "string" 2155 format: "dateTime" 2156 Message: 2157 type: "string" 2158 example: 2159 ID: "9mnpnzenvg8p8tdbtq4wvbkcz" 2160 Version: 2161 Index: 19 2162 CreatedAt: "2016-06-07T21:05:51.880065305Z" 2163 UpdatedAt: "2016-06-07T21:07:29.962229872Z" 2164 Spec: 2165 Name: "hopeful_cori" 2166 TaskTemplate: 2167 ContainerSpec: 2168 Image: "redis" 2169 Resources: 2170 Limits: {} 2171 Reservations: {} 2172 RestartPolicy: 2173 Condition: "any" 2174 MaxAttempts: 0 2175 Placement: {} 2176 ForceUpdate: 0 2177 Mode: 2178 Replicated: 2179 Replicas: 1 2180 UpdateConfig: 2181 Parallelism: 1 2182 FailureAction: "pause" 2183 Monitor: 15000000000 2184 MaxFailureRatio: 0.15 2185 EndpointSpec: 2186 Mode: "vip" 2187 Ports: 2188 - 2189 Protocol: "tcp" 2190 TargetPort: 6379 2191 PublishedPort: 30001 2192 Endpoint: 2193 Spec: 2194 Mode: "vip" 2195 Ports: 2196 - 2197 Protocol: "tcp" 2198 TargetPort: 6379 2199 PublishedPort: 30001 2200 Ports: 2201 - 2202 Protocol: "tcp" 2203 TargetPort: 6379 2204 PublishedPort: 30001 2205 VirtualIPs: 2206 - 2207 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 2208 Addr: "10.255.0.2/16" 2209 - 2210 NetworkID: "4qvuz4ko70xaltuqbt8956gd1" 2211 Addr: "10.255.0.3/16" 2212 ImageDeleteResponse: 2213 type: "object" 2214 properties: 2215 Untagged: 2216 description: "The image ID of an image that was untagged" 2217 type: "string" 2218 Deleted: 2219 description: "The image ID of an image that was deleted" 2220 type: "string" 2221 ContainerSummary: 2222 type: "array" 2223 items: 2224 type: "object" 2225 properties: 2226 Id: 2227 description: "The ID of this container" 2228 type: "string" 2229 x-go-name: "ID" 2230 Names: 2231 description: "The names that this container has been given" 2232 type: "array" 2233 items: 2234 type: "string" 2235 Image: 2236 description: "The name of the image used when creating this container" 2237 type: "string" 2238 ImageID: 2239 description: "The ID of the image that this container was created from" 2240 type: "string" 2241 Command: 2242 description: "Command to run when starting the container" 2243 type: "string" 2244 Created: 2245 description: "When the container was created" 2246 type: "integer" 2247 format: "int64" 2248 Ports: 2249 description: "The ports exposed by this container" 2250 type: "array" 2251 items: 2252 $ref: "#/definitions/Port" 2253 SizeRw: 2254 description: "The size of files that have been created or changed by this container" 2255 type: "integer" 2256 format: "int64" 2257 SizeRootFs: 2258 description: "The total size of all the files in this container" 2259 type: "integer" 2260 format: "int64" 2261 Labels: 2262 description: "User-defined key/value metadata." 2263 type: "object" 2264 additionalProperties: 2265 type: "string" 2266 State: 2267 description: "The state of this container (e.g. `Exited`)" 2268 type: "string" 2269 Status: 2270 description: "Additional human-readable status of this container (e.g. `Exit 0`)" 2271 type: "string" 2272 HostConfig: 2273 type: "object" 2274 properties: 2275 NetworkMode: 2276 type: "string" 2277 NetworkSettings: 2278 description: "A summary of the container's network settings" 2279 type: "object" 2280 properties: 2281 Networks: 2282 type: "object" 2283 additionalProperties: 2284 $ref: "#/definitions/EndpointSettings" 2285 Mounts: 2286 type: "array" 2287 items: 2288 $ref: "#/definitions/Mount" 2289 2290 paths: 2291 /containers/json: 2292 get: 2293 summary: "List containers" 2294 operationId: "GetContainerList" 2295 produces: 2296 - "application/json" 2297 parameters: 2298 - name: "all" 2299 in: "query" 2300 description: "Return all containers. By default, only running containers are shown" 2301 type: "boolean" 2302 default: false 2303 - name: "limit" 2304 in: "query" 2305 description: "Return this number of most recently created containers, including non-running ones." 2306 type: "integer" 2307 - name: "size" 2308 in: "query" 2309 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`." 2310 type: "boolean" 2311 default: false 2312 - name: "filters" 2313 in: "query" 2314 description: | 2315 Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. 2316 2317 Available filters: 2318 - `exited=<int>` containers with exit code of `<int>` 2319 - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) 2320 - `label=key` or `label="key=value"` of a container label 2321 - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) 2322 - `id=<ID>` a container's ID 2323 - `name=<name>` a container's name 2324 - `is-task=`(`true`|`false`) 2325 - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`) 2326 - `before`=(`<container id>` or `<container name>`) 2327 - `since`=(`<container id>` or `<container name>`) 2328 - `volume`=(`<volume name>` or `<mount point destination>`) 2329 - `network`=(`<network id>` or `<network name>`) 2330 - `health`=(`starting`|`healthy`|`unhealthy`|`none`) 2331 type: "string" 2332 responses: 2333 200: 2334 description: "no error" 2335 schema: 2336 $ref: "#/definitions/ContainerSummary" 2337 examples: 2338 application/json: 2339 - Id: "8dfafdbc3a40" 2340 Names: 2341 - "/boring_feynman" 2342 Image: "ubuntu:latest" 2343 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 2344 Command: "echo 1" 2345 Created: 1367854155 2346 State: "Exited" 2347 Status: "Exit 0" 2348 Ports: 2349 - PrivatePort: 2222 2350 PublicPort: 3333 2351 Type: "tcp" 2352 Labels: 2353 com.example.vendor: "Acme" 2354 com.example.license: "GPL" 2355 com.example.version: "1.0" 2356 SizeRw: 12288 2357 SizeRootFs: 0 2358 HostConfig: 2359 NetworkMode: "default" 2360 NetworkSettings: 2361 Networks: 2362 bridge: 2363 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 2364 EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" 2365 Gateway: "172.17.0.1" 2366 IPAddress: "172.17.0.2" 2367 IPPrefixLen: 16 2368 IPv6Gateway: "" 2369 GlobalIPv6Address: "" 2370 GlobalIPv6PrefixLen: 0 2371 MacAddress: "02:42:ac:11:00:02" 2372 Mounts: 2373 - Name: "fac362...80535" 2374 Source: "/data" 2375 Destination: "/data" 2376 Driver: "local" 2377 Mode: "ro,Z" 2378 RW: false 2379 Propagation: "" 2380 - Id: "9cd87474be90" 2381 Names: 2382 - "/coolName" 2383 Image: "ubuntu:latest" 2384 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 2385 Command: "echo 222222" 2386 Created: 1367854155 2387 State: "Exited" 2388 Status: "Exit 0" 2389 Ports: [] 2390 Labels: {} 2391 SizeRw: 12288 2392 SizeRootFs: 0 2393 HostConfig: 2394 NetworkMode: "default" 2395 NetworkSettings: 2396 Networks: 2397 bridge: 2398 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 2399 EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" 2400 Gateway: "172.17.0.1" 2401 IPAddress: "172.17.0.8" 2402 IPPrefixLen: 16 2403 IPv6Gateway: "" 2404 GlobalIPv6Address: "" 2405 GlobalIPv6PrefixLen: 0 2406 MacAddress: "02:42:ac:11:00:08" 2407 Mounts: [] 2408 - Id: "3176a2479c92" 2409 Names: 2410 - "/sleepy_dog" 2411 Image: "ubuntu:latest" 2412 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 2413 Command: "echo 3333333333333333" 2414 Created: 1367854154 2415 State: "Exited" 2416 Status: "Exit 0" 2417 Ports: [] 2418 Labels: {} 2419 SizeRw: 12288 2420 SizeRootFs: 0 2421 HostConfig: 2422 NetworkMode: "default" 2423 NetworkSettings: 2424 Networks: 2425 bridge: 2426 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 2427 EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" 2428 Gateway: "172.17.0.1" 2429 IPAddress: "172.17.0.6" 2430 IPPrefixLen: 16 2431 IPv6Gateway: "" 2432 GlobalIPv6Address: "" 2433 GlobalIPv6PrefixLen: 0 2434 MacAddress: "02:42:ac:11:00:06" 2435 Mounts: [] 2436 - Id: "4cb07b47f9fb" 2437 Names: 2438 - "/running_cat" 2439 Image: "ubuntu:latest" 2440 ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" 2441 Command: "echo 444444444444444444444444444444444" 2442 Created: 1367854152 2443 State: "Exited" 2444 Status: "Exit 0" 2445 Ports: [] 2446 Labels: {} 2447 SizeRw: 12288 2448 SizeRootFs: 0 2449 HostConfig: 2450 NetworkMode: "default" 2451 NetworkSettings: 2452 Networks: 2453 bridge: 2454 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 2455 EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" 2456 Gateway: "172.17.0.1" 2457 IPAddress: "172.17.0.5" 2458 IPPrefixLen: 16 2459 IPv6Gateway: "" 2460 GlobalIPv6Address: "" 2461 GlobalIPv6PrefixLen: 0 2462 MacAddress: "02:42:ac:11:00:05" 2463 Mounts: [] 2464 400: 2465 description: "bad parameter" 2466 schema: 2467 $ref: "#/definitions/ErrorResponse" 2468 500: 2469 description: "server error" 2470 schema: 2471 $ref: "#/definitions/ErrorResponse" 2472 tags: 2473 - "Container" 2474 /containers/create: 2475 post: 2476 summary: "Create a container" 2477 operationId: "ContainerCreate" 2478 consumes: 2479 - "application/json" 2480 - "application/octet-stream" 2481 produces: 2482 - "application/json" 2483 parameters: 2484 - name: "name" 2485 in: "query" 2486 description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`." 2487 type: "string" 2488 pattern: "/?[a-zA-Z0-9_-]+" 2489 - name: "body" 2490 in: "body" 2491 description: "Container to create" 2492 schema: 2493 allOf: 2494 - $ref: "#/definitions/Config" 2495 - type: "object" 2496 properties: 2497 HostConfig: 2498 $ref: "#/definitions/HostConfig" 2499 NetworkingConfig: 2500 description: "This container's networking configuration." 2501 type: "object" 2502 properties: 2503 EndpointsConfig: 2504 description: "A mapping of network name to endpoint configuration for that network." 2505 type: "object" 2506 additionalProperties: 2507 $ref: "#/definitions/EndpointSettings" 2508 example: 2509 Hostname: "" 2510 Domainname: "" 2511 User: "" 2512 AttachStdin: false 2513 AttachStdout: true 2514 AttachStderr: true 2515 Tty: false 2516 OpenStdin: false 2517 StdinOnce: false 2518 Env: 2519 - "FOO=bar" 2520 - "BAZ=quux" 2521 Cmd: 2522 - "date" 2523 Entrypoint: "" 2524 Image: "ubuntu" 2525 Labels: 2526 com.example.vendor: "Acme" 2527 com.example.license: "GPL" 2528 com.example.version: "1.0" 2529 Volumes: 2530 /volumes/data: {} 2531 WorkingDir: "" 2532 NetworkDisabled: false 2533 MacAddress: "12:34:56:78:9a:bc" 2534 ExposedPorts: 2535 22/tcp: {} 2536 StopSignal: "SIGTERM" 2537 StopTimeout: 10 2538 HostConfig: 2539 Binds: 2540 - "/tmp:/tmp" 2541 Links: 2542 - "redis3:redis" 2543 Memory: 0 2544 MemorySwap: 0 2545 MemoryReservation: 0 2546 KernelMemory: 0 2547 NanoCPUs: 500000 2548 CpuPercent: 80 2549 CpuShares: 512 2550 CpuPeriod: 100000 2551 CpuRealtimePeriod: 1000000 2552 CpuRealtimeRuntime: 10000 2553 CpuQuota: 50000 2554 CpusetCpus: "0,1" 2555 CpusetMems: "0,1" 2556 MaximumIOps: 0 2557 MaximumIOBps: 0 2558 BlkioWeight: 300 2559 BlkioWeightDevice: 2560 - {} 2561 BlkioDeviceReadBps: 2562 - {} 2563 BlkioDeviceReadIOps: 2564 - {} 2565 BlkioDeviceWriteBps: 2566 - {} 2567 BlkioDeviceWriteIOps: 2568 - {} 2569 MemorySwappiness: 60 2570 OomKillDisable: false 2571 OomScoreAdj: 500 2572 PidMode: "" 2573 PidsLimit: -1 2574 PortBindings: 2575 22/tcp: 2576 - HostPort: "11022" 2577 PublishAllPorts: false 2578 Privileged: false 2579 ReadonlyRootfs: false 2580 Dns: 2581 - "8.8.8.8" 2582 DnsOptions: 2583 - "" 2584 DnsSearch: 2585 - "" 2586 VolumesFrom: 2587 - "parent" 2588 - "other:ro" 2589 CapAdd: 2590 - "NET_ADMIN" 2591 CapDrop: 2592 - "MKNOD" 2593 GroupAdd: 2594 - "newgroup" 2595 RestartPolicy: 2596 Name: "" 2597 MaximumRetryCount: 0 2598 AutoRemove: true 2599 NetworkMode: "bridge" 2600 Devices: [] 2601 Ulimits: 2602 - {} 2603 LogConfig: 2604 Type: "json-file" 2605 Config: {} 2606 SecurityOpt: [] 2607 StorageOpt: {} 2608 CgroupParent: "" 2609 VolumeDriver: "" 2610 ShmSize: 67108864 2611 NetworkingConfig: 2612 EndpointsConfig: 2613 isolated_nw: 2614 IPAMConfig: 2615 IPv4Address: "172.20.30.33" 2616 IPv6Address: "2001:db8:abcd::3033" 2617 LinkLocalIPs: 2618 - "169.254.34.68" 2619 - "fe80::3468" 2620 Links: 2621 - "container_1" 2622 - "container_2" 2623 Aliases: 2624 - "server_x" 2625 - "server_y" 2626 2627 required: true 2628 responses: 2629 201: 2630 description: "Container created successfully" 2631 schema: 2632 type: "object" 2633 required: [Id, Warnings] 2634 properties: 2635 Id: 2636 description: "The ID of the created container" 2637 type: "string" 2638 x-nullable: false 2639 Warnings: 2640 description: "Warnings encountered when creating the container" 2641 type: "array" 2642 x-nullable: false 2643 items: 2644 type: "string" 2645 examples: 2646 application/json: 2647 Id: "e90e34656806" 2648 Warnings: [] 2649 400: 2650 description: "bad parameter" 2651 schema: 2652 $ref: "#/definitions/ErrorResponse" 2653 404: 2654 description: "no such container" 2655 schema: 2656 $ref: "#/definitions/ErrorResponse" 2657 examples: 2658 application/json: 2659 message: "No such container: c2ada9df5af8" 2660 406: 2661 description: "impossible to attach" 2662 schema: 2663 $ref: "#/definitions/ErrorResponse" 2664 409: 2665 description: "conflict" 2666 schema: 2667 $ref: "#/definitions/ErrorResponse" 2668 500: 2669 description: "server error" 2670 schema: 2671 $ref: "#/definitions/ErrorResponse" 2672 tags: 2673 - "Container" 2674 /containers/{id}/json: 2675 get: 2676 summary: "Inspect a container" 2677 description: "Return low-level information about a container." 2678 operationId: "GetContainerInspect" 2679 produces: 2680 - "application/json" 2681 responses: 2682 200: 2683 description: "no error" 2684 schema: 2685 type: "object" 2686 properties: 2687 Id: 2688 description: "The ID of the container" 2689 type: "string" 2690 Created: 2691 description: "The time the container was created" 2692 type: "string" 2693 Path: 2694 description: "The path to the command being run" 2695 type: "string" 2696 Args: 2697 description: "The arguments to the command being run" 2698 type: "array" 2699 items: 2700 type: "string" 2701 State: 2702 description: "The state of the container." 2703 type: "object" 2704 properties: 2705 Status: 2706 description: "The status of the container. For example, `running` or `exited`." 2707 type: "string" 2708 Running: 2709 description: "Whether this container is running." 2710 type: "boolean" 2711 Paused: 2712 description: "Whether this container is paused." 2713 type: "boolean" 2714 Restarting: 2715 description: "Whether this container is restarting." 2716 type: "boolean" 2717 OOMKilled: 2718 description: "Whether this container has been killed because it ran out of memory." 2719 type: "boolean" 2720 Dead: 2721 type: "boolean" 2722 Pid: 2723 description: "The process ID of this container" 2724 type: "integer" 2725 ExitCode: 2726 description: "The last exit code of this container" 2727 type: "integer" 2728 Error: 2729 type: "string" 2730 StartedAt: 2731 description: "The time when this container was last started." 2732 type: "string" 2733 FinishedAt: 2734 description: "The time when this container last exited." 2735 type: "string" 2736 Image: 2737 description: "The container's image" 2738 type: "string" 2739 ResolvConfPath: 2740 type: "string" 2741 HostnamePath: 2742 type: "string" 2743 HostsPath: 2744 type: "string" 2745 LogPath: 2746 type: "string" 2747 Node: 2748 description: "TODO" 2749 type: "object" 2750 Name: 2751 type: "string" 2752 RestartCount: 2753 type: "integer" 2754 Driver: 2755 type: "string" 2756 MountLabel: 2757 type: "string" 2758 ProcessLabel: 2759 type: "string" 2760 AppArmorProfile: 2761 type: "string" 2762 ExecIDs: 2763 type: "string" 2764 HostConfig: 2765 $ref: "#/definitions/HostConfig" 2766 GraphDriver: 2767 $ref: "#/definitions/GraphDriver" 2768 SizeRw: 2769 description: "The size of files that have been created or changed by this container." 2770 type: "integer" 2771 format: "int64" 2772 SizeRootFs: 2773 description: "The total size of all the files in this container." 2774 type: "integer" 2775 format: "int64" 2776 Mounts: 2777 type: "array" 2778 items: 2779 $ref: "#/definitions/MountPoint" 2780 Config: 2781 $ref: "#/definitions/Config" 2782 NetworkSettings: 2783 $ref: "#/definitions/NetworkConfig" 2784 examples: 2785 application/json: 2786 AppArmorProfile: "" 2787 Args: 2788 - "-c" 2789 - "exit 9" 2790 Config: 2791 AttachStderr: true 2792 AttachStdin: false 2793 AttachStdout: true 2794 Cmd: 2795 - "/bin/sh" 2796 - "-c" 2797 - "exit 9" 2798 Domainname: "" 2799 Env: 2800 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 2801 Hostname: "ba033ac44011" 2802 Image: "ubuntu" 2803 Labels: 2804 com.example.vendor: "Acme" 2805 com.example.license: "GPL" 2806 com.example.version: "1.0" 2807 MacAddress: "" 2808 NetworkDisabled: false 2809 OpenStdin: false 2810 StdinOnce: false 2811 Tty: false 2812 User: "" 2813 Volumes: 2814 /volumes/data: {} 2815 WorkingDir: "" 2816 StopSignal: "SIGTERM" 2817 StopTimeout: 10 2818 Created: "2015-01-06T15:47:31.485331387Z" 2819 Driver: "devicemapper" 2820 HostConfig: 2821 MaximumIOps: 0 2822 MaximumIOBps: 0 2823 BlkioWeight: 0 2824 BlkioWeightDevice: 2825 - {} 2826 BlkioDeviceReadBps: 2827 - {} 2828 BlkioDeviceWriteBps: 2829 - {} 2830 BlkioDeviceReadIOps: 2831 - {} 2832 BlkioDeviceWriteIOps: 2833 - {} 2834 ContainerIDFile: "" 2835 CpusetCpus: "" 2836 CpusetMems: "" 2837 CpuPercent: 80 2838 CpuShares: 0 2839 CpuPeriod: 100000 2840 CpuRealtimePeriod: 1000000 2841 CpuRealtimeRuntime: 10000 2842 Devices: [] 2843 IpcMode: "" 2844 LxcConf: [] 2845 Memory: 0 2846 MemorySwap: 0 2847 MemoryReservation: 0 2848 KernelMemory: 0 2849 OomKillDisable: false 2850 OomScoreAdj: 500 2851 NetworkMode: "bridge" 2852 PidMode: "" 2853 PortBindings: {} 2854 Privileged: false 2855 ReadonlyRootfs: false 2856 PublishAllPorts: false 2857 RestartPolicy: 2858 MaximumRetryCount: 2 2859 Name: "on-failure" 2860 LogConfig: 2861 Type: "json-file" 2862 Sysctls: 2863 net.ipv4.ip_forward: "1" 2864 Ulimits: 2865 - {} 2866 VolumeDriver: "" 2867 ShmSize: 67108864 2868 HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" 2869 HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" 2870 LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" 2871 Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" 2872 Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" 2873 MountLabel: "" 2874 Name: "/boring_euclid" 2875 NetworkSettings: 2876 Bridge: "" 2877 SandboxID: "" 2878 HairpinMode: false 2879 LinkLocalIPv6Address: "" 2880 LinkLocalIPv6PrefixLen: 0 2881 SandboxKey: "" 2882 SecondaryIPAddresses: null 2883 SecondaryIPv6Addresses: null 2884 EndpointID: "" 2885 Gateway: "" 2886 GlobalIPv6Address: "" 2887 GlobalIPv6PrefixLen: 0 2888 IPAddress: "" 2889 IPPrefixLen: 0 2890 IPv6Gateway: "" 2891 MacAddress: "" 2892 Networks: 2893 bridge: 2894 NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" 2895 EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" 2896 Gateway: "172.17.0.1" 2897 IPAddress: "172.17.0.2" 2898 IPPrefixLen: 16 2899 IPv6Gateway: "" 2900 GlobalIPv6Address: "" 2901 GlobalIPv6PrefixLen: 0 2902 MacAddress: "02:42:ac:12:00:02" 2903 Path: "/bin/sh" 2904 ProcessLabel: "" 2905 ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" 2906 RestartCount: 1 2907 State: 2908 Error: "" 2909 ExitCode: 9 2910 FinishedAt: "2015-01-06T15:47:32.080254511Z" 2911 OOMKilled: false 2912 Dead: false 2913 Paused: false 2914 Pid: 0 2915 Restarting: false 2916 Running: true 2917 StartedAt: "2015-01-06T15:47:32.072697474Z" 2918 Status: "running" 2919 Mounts: 2920 - Name: "fac362...80535" 2921 Source: "/data" 2922 Destination: "/data" 2923 Driver: "local" 2924 Mode: "ro,Z" 2925 RW: false 2926 Propagation: "" 2927 404: 2928 description: "no such container" 2929 schema: 2930 $ref: "#/definitions/ErrorResponse" 2931 examples: 2932 application/json: 2933 message: "No such container: c2ada9df5af8" 2934 500: 2935 description: "server error" 2936 schema: 2937 $ref: "#/definitions/ErrorResponse" 2938 parameters: 2939 - name: "id" 2940 in: "path" 2941 required: true 2942 description: "ID or name of the container" 2943 type: "string" 2944 - name: "size" 2945 in: "query" 2946 type: "boolean" 2947 default: false 2948 description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" 2949 tags: 2950 - "Container" 2951 /containers/{id}/top: 2952 get: 2953 summary: "List processes running inside a container" 2954 description: "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows." 2955 operationId: "GetContainerTop" 2956 responses: 2957 200: 2958 description: "no error" 2959 schema: 2960 type: "object" 2961 properties: 2962 Titles: 2963 description: "The ps column titles" 2964 type: "array" 2965 items: 2966 type: "string" 2967 Processes: 2968 description: "Each process running in the container, where each is process is an array of values corresponding to the titles" 2969 type: "array" 2970 items: 2971 type: "array" 2972 items: 2973 type: "string" 2974 examples: 2975 application/json: 2976 Titles: 2977 - "UID" 2978 - "PID" 2979 - "PPID" 2980 - "C" 2981 - "STIME" 2982 - "TTY" 2983 - "TIME" 2984 - "CMD" 2985 Processes: 2986 - 2987 - "root" 2988 - "13642" 2989 - "882" 2990 - "0" 2991 - "17:03" 2992 - "pts/0" 2993 - "00:00:00" 2994 - "/bin/bash" 2995 - 2996 - "root" 2997 - "13735" 2998 - "13642" 2999 - "0" 3000 - "17:06" 3001 - "pts/0" 3002 - "00:00:00" 3003 - "sleep 10" 3004 404: 3005 description: "no such container" 3006 schema: 3007 $ref: "#/definitions/ErrorResponse" 3008 examples: 3009 application/json: 3010 message: "No such container: c2ada9df5af8" 3011 500: 3012 description: "server error" 3013 schema: 3014 $ref: "#/definitions/ErrorResponse" 3015 parameters: 3016 - name: "id" 3017 in: "path" 3018 required: true 3019 description: "ID or name of the container" 3020 type: "string" 3021 - name: "ps_args" 3022 in: "query" 3023 description: "The arguments to pass to `ps`. For example, `aux`" 3024 type: "string" 3025 default: "-ef" 3026 tags: 3027 - "Container" 3028 /containers/{id}/logs: 3029 get: 3030 summary: "Get container logs" 3031 description: | 3032 Get `stdout` and `stderr` logs from a container. 3033 3034 Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. 3035 operationId: "GetContainerLogs" 3036 responses: 3037 101: 3038 description: "logs returned as a stream" 3039 schema: 3040 type: "string" 3041 format: "binary" 3042 200: 3043 description: "logs returned as a string in response body" 3044 schema: 3045 type: "string" 3046 404: 3047 description: "no such container" 3048 schema: 3049 $ref: "#/definitions/ErrorResponse" 3050 examples: 3051 application/json: 3052 message: "No such container: c2ada9df5af8" 3053 500: 3054 description: "server error" 3055 schema: 3056 $ref: "#/definitions/ErrorResponse" 3057 parameters: 3058 - name: "id" 3059 in: "path" 3060 required: true 3061 description: "ID or name of the container" 3062 type: "string" 3063 - name: "follow" 3064 in: "query" 3065 description: | 3066 Return the logs as a stream. 3067 3068 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/PostContainerAttach). 3069 type: "boolean" 3070 default: false 3071 - name: "stdout" 3072 in: "query" 3073 description: "Return logs from `stdout`" 3074 type: "boolean" 3075 default: false 3076 - name: "stderr" 3077 in: "query" 3078 description: "Return logs from `stderr`" 3079 type: "boolean" 3080 default: false 3081 - name: "since" 3082 in: "query" 3083 description: "Only return logs since this time, as a UNIX timestamp" 3084 type: "integer" 3085 default: 0 3086 - name: "timestamps" 3087 in: "query" 3088 description: "Add timestamps to every log line" 3089 type: "boolean" 3090 default: false 3091 - name: "tail" 3092 in: "query" 3093 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." 3094 type: "string" 3095 default: "all" 3096 tags: 3097 - "Container" 3098 /containers/{id}/changes: 3099 get: 3100 summary: "Get changes on a container’s filesystem" 3101 description: | 3102 Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: 3103 3104 - `0`: Modified 3105 - `1`: Added 3106 - `2`: Deleted 3107 operationId: "GetContainerChanges" 3108 produces: 3109 - "application/json" 3110 responses: 3111 200: 3112 description: "no error" 3113 schema: 3114 type: "array" 3115 items: 3116 type: "object" 3117 properties: 3118 Path: 3119 description: "Path to file that has changed" 3120 type: "string" 3121 Kind: 3122 description: "Kind of change" 3123 type: "integer" 3124 enum: 3125 - 0 3126 - 1 3127 - 2 3128 examples: 3129 application/json: 3130 - Path: "/dev" 3131 Kind: 0 3132 - Path: "/dev/kmsg" 3133 Kind: 1 3134 - Path: "/test" 3135 Kind: 1 3136 404: 3137 description: "no such container" 3138 schema: 3139 $ref: "#/definitions/ErrorResponse" 3140 examples: 3141 application/json: 3142 message: "No such container: c2ada9df5af8" 3143 500: 3144 description: "server error" 3145 schema: 3146 $ref: "#/definitions/ErrorResponse" 3147 parameters: 3148 - name: "id" 3149 in: "path" 3150 required: true 3151 description: "ID or name of the container" 3152 type: "string" 3153 tags: 3154 - "Container" 3155 /containers/{id}/export: 3156 get: 3157 summary: "Export a container" 3158 description: "Export the contents of a container as a tarball." 3159 operationId: "GetContainerExport" 3160 produces: 3161 - "application/octet-stream" 3162 responses: 3163 200: 3164 description: "no error" 3165 404: 3166 description: "no such container" 3167 schema: 3168 $ref: "#/definitions/ErrorResponse" 3169 examples: 3170 application/json: 3171 message: "No such container: c2ada9df5af8" 3172 500: 3173 description: "server error" 3174 schema: 3175 $ref: "#/definitions/ErrorResponse" 3176 parameters: 3177 - name: "id" 3178 in: "path" 3179 required: true 3180 description: "ID or name of the container" 3181 type: "string" 3182 tags: 3183 - "Container" 3184 /containers/{id}/stats: 3185 get: 3186 summary: "Get container stats based on resource usage" 3187 description: | 3188 This endpoint returns a live stream of a container’s resource usage statistics. 3189 3190 The `precpu_stats` is the CPU statistic of last read, which is used for calculating the CPU usage percentage. It is not the same as the `cpu_stats` field. 3191 operationId: "GetContainerStats" 3192 produces: 3193 - "application/json" 3194 responses: 3195 200: 3196 description: "no error" 3197 schema: 3198 type: "object" 3199 examples: 3200 application/json: 3201 read: "2015-01-08T22:57:31.547920715Z" 3202 pids_stats: 3203 current: 3 3204 networks: 3205 eth0: 3206 rx_bytes: 5338 3207 rx_dropped: 0 3208 rx_errors: 0 3209 rx_packets: 36 3210 tx_bytes: 648 3211 tx_dropped: 0 3212 tx_errors: 0 3213 tx_packets: 8 3214 eth5: 3215 rx_bytes: 4641 3216 rx_dropped: 0 3217 rx_errors: 0 3218 rx_packets: 26 3219 tx_bytes: 690 3220 tx_dropped: 0 3221 tx_errors: 0 3222 tx_packets: 9 3223 memory_stats: 3224 stats: 3225 total_pgmajfault: 0 3226 cache: 0 3227 mapped_file: 0 3228 total_inactive_file: 0 3229 pgpgout: 414 3230 rss: 6537216 3231 total_mapped_file: 0 3232 writeback: 0 3233 unevictable: 0 3234 pgpgin: 477 3235 total_unevictable: 0 3236 pgmajfault: 0 3237 total_rss: 6537216 3238 total_rss_huge: 6291456 3239 total_writeback: 0 3240 total_inactive_anon: 0 3241 rss_huge: 6291456 3242 hierarchical_memory_limit: 67108864 3243 total_pgfault: 964 3244 total_active_file: 0 3245 active_anon: 6537216 3246 total_active_anon: 6537216 3247 total_pgpgout: 414 3248 total_cache: 0 3249 inactive_anon: 0 3250 active_file: 0 3251 pgfault: 964 3252 inactive_file: 0 3253 total_pgpgin: 477 3254 max_usage: 6651904 3255 usage: 6537216 3256 failcnt: 0 3257 limit: 67108864 3258 blkio_stats: {} 3259 cpu_stats: 3260 cpu_usage: 3261 percpu_usage: 3262 - 8646879 3263 - 24472255 3264 - 36438778 3265 - 30657443 3266 usage_in_usermode: 50000000 3267 total_usage: 100215355 3268 usage_in_kernelmode: 30000000 3269 system_cpu_usage: 739306590000000 3270 throttling_data: 3271 periods: 0 3272 throttled_periods: 0 3273 throttled_time: 0 3274 precpu_stats: 3275 cpu_usage: 3276 percpu_usage: 3277 - 8646879 3278 - 24350896 3279 - 36438778 3280 - 30657443 3281 usage_in_usermode: 50000000 3282 total_usage: 100093996 3283 usage_in_kernelmode: 30000000 3284 system_cpu_usage: 9492140000000 3285 throttling_data: 3286 periods: 0 3287 throttled_periods: 0 3288 throttled_time: 0 3289 404: 3290 description: "no such container" 3291 schema: 3292 $ref: "#/definitions/ErrorResponse" 3293 examples: 3294 application/json: 3295 message: "No such container: c2ada9df5af8" 3296 500: 3297 description: "server error" 3298 schema: 3299 $ref: "#/definitions/ErrorResponse" 3300 parameters: 3301 - name: "id" 3302 in: "path" 3303 required: true 3304 description: "ID or name of the container" 3305 type: "string" 3306 - name: "stream" 3307 in: "query" 3308 description: "Stream the output. If false, the stats will be output once and then it will disconnect." 3309 type: "boolean" 3310 default: true 3311 tags: 3312 - "Container" 3313 /containers/{id}/resize: 3314 post: 3315 summary: "Resize a container TTY" 3316 description: "Resize the TTY for a container. You must restart the container for the resize to take effect." 3317 operationId: "PostContainerResize" 3318 consumes: 3319 - "application/octet-stream" 3320 produces: 3321 - "text/plain" 3322 responses: 3323 200: 3324 description: "no error" 3325 404: 3326 description: "no such container" 3327 schema: 3328 $ref: "#/definitions/ErrorResponse" 3329 examples: 3330 application/json: 3331 message: "No such container: c2ada9df5af8" 3332 500: 3333 description: "cannot resize container" 3334 schema: 3335 $ref: "#/definitions/ErrorResponse" 3336 parameters: 3337 - name: "id" 3338 in: "path" 3339 required: true 3340 description: "ID or name of the container" 3341 type: "string" 3342 - name: "h" 3343 in: "query" 3344 description: "Height of the tty session in characters" 3345 type: "integer" 3346 - name: "w" 3347 in: "query" 3348 description: "Width of the tty session in characters" 3349 type: "integer" 3350 tags: 3351 - "Container" 3352 /containers/{id}/start: 3353 post: 3354 summary: "Start a container" 3355 operationId: "PostContainerStart" 3356 responses: 3357 204: 3358 description: "no error" 3359 304: 3360 description: "container already started" 3361 schema: 3362 $ref: "#/definitions/ErrorResponse" 3363 404: 3364 description: "no such container" 3365 schema: 3366 $ref: "#/definitions/ErrorResponse" 3367 examples: 3368 application/json: 3369 message: "No such container: c2ada9df5af8" 3370 500: 3371 description: "server error" 3372 schema: 3373 $ref: "#/definitions/ErrorResponse" 3374 parameters: 3375 - name: "id" 3376 in: "path" 3377 required: true 3378 description: "ID or name of the container" 3379 type: "string" 3380 - name: "detachKeys" 3381 in: "query" 3382 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 `_`." 3383 type: "string" 3384 tags: 3385 - "Container" 3386 /containers/{id}/stop: 3387 post: 3388 summary: "Stop a container" 3389 operationId: "PostContainerStop" 3390 responses: 3391 204: 3392 description: "no error" 3393 304: 3394 description: "container already stopped" 3395 schema: 3396 $ref: "#/definitions/ErrorResponse" 3397 404: 3398 description: "no such container" 3399 schema: 3400 $ref: "#/definitions/ErrorResponse" 3401 examples: 3402 application/json: 3403 message: "No such container: c2ada9df5af8" 3404 500: 3405 description: "server error" 3406 schema: 3407 $ref: "#/definitions/ErrorResponse" 3408 parameters: 3409 - name: "id" 3410 in: "path" 3411 required: true 3412 description: "ID or name of the container" 3413 type: "string" 3414 - name: "t" 3415 in: "query" 3416 description: "Number of seconds to wait before killing the container" 3417 type: "integer" 3418 tags: 3419 - "Container" 3420 /containers/{id}/restart: 3421 post: 3422 summary: "Restart a container" 3423 operationId: "PostContainerRestart" 3424 responses: 3425 204: 3426 description: "no error" 3427 404: 3428 description: "no such container" 3429 schema: 3430 $ref: "#/definitions/ErrorResponse" 3431 examples: 3432 application/json: 3433 message: "No such container: c2ada9df5af8" 3434 500: 3435 description: "server error" 3436 schema: 3437 $ref: "#/definitions/ErrorResponse" 3438 parameters: 3439 - name: "id" 3440 in: "path" 3441 required: true 3442 description: "ID or name of the container" 3443 type: "string" 3444 - name: "t" 3445 in: "query" 3446 description: "Number of seconds to wait before killing the container" 3447 type: "integer" 3448 tags: 3449 - "Container" 3450 /containers/{id}/kill: 3451 post: 3452 summary: "Kill a container" 3453 description: "Send a POSIX signal to a container, defaulting to killing to the container." 3454 operationId: "PostContainerKill" 3455 responses: 3456 204: 3457 description: "no error" 3458 404: 3459 description: "no such container" 3460 schema: 3461 $ref: "#/definitions/ErrorResponse" 3462 examples: 3463 application/json: 3464 message: "No such container: c2ada9df5af8" 3465 500: 3466 description: "server error" 3467 schema: 3468 $ref: "#/definitions/ErrorResponse" 3469 parameters: 3470 - name: "id" 3471 in: "path" 3472 required: true 3473 description: "ID or name of the container" 3474 type: "string" 3475 - name: "signal" 3476 in: "query" 3477 description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)" 3478 type: "string" 3479 default: "SIGKILL" 3480 tags: 3481 - "Container" 3482 /containers/{id}/update: 3483 post: 3484 summary: "Update a container" 3485 description: "Change various configuration options of a container without having to recreate it." 3486 operationId: "ContainerUpdate" 3487 consumes: ["application/json"] 3488 produces: ["application/json"] 3489 responses: 3490 200: 3491 description: "The container has been updated." 3492 schema: 3493 type: "object" 3494 properties: 3495 Warnings: 3496 type: "array" 3497 items: 3498 type: "string" 3499 404: 3500 description: "no such container" 3501 schema: 3502 $ref: "#/definitions/ErrorResponse" 3503 examples: 3504 application/json: 3505 message: "No such container: c2ada9df5af8" 3506 500: 3507 description: "server error" 3508 schema: 3509 $ref: "#/definitions/ErrorResponse" 3510 parameters: 3511 - name: "id" 3512 in: "path" 3513 required: true 3514 description: "ID or name of the container" 3515 type: "string" 3516 - name: "update" 3517 in: "body" 3518 required: true 3519 schema: 3520 allOf: 3521 - $ref: "#/definitions/Resources" 3522 - type: "object" 3523 properties: 3524 RestartPolicy: 3525 $ref: "#/definitions/RestartPolicy" 3526 example: 3527 BlkioWeight: 300 3528 CpuShares: 512 3529 CpuPeriod: 100000 3530 CpuQuota: 50000 3531 CpuRealtimePeriod: 1000000 3532 CpuRealtimeRuntime: 10000 3533 CpusetCpus: "0,1" 3534 CpusetMems: "0" 3535 Memory: 314572800 3536 MemorySwap: 514288000 3537 MemoryReservation: 209715200 3538 KernelMemory: 52428800 3539 RestartPolicy: 3540 MaximumRetryCount: 4 3541 Name: "on-failure" 3542 tags: 3543 - "Container" 3544 /containers/{id}/rename: 3545 post: 3546 summary: "Rename a container" 3547 operationId: "PostContainerRename" 3548 responses: 3549 204: 3550 description: "no error" 3551 404: 3552 description: "no such container" 3553 schema: 3554 $ref: "#/definitions/ErrorResponse" 3555 examples: 3556 application/json: 3557 message: "No such container: c2ada9df5af8" 3558 409: 3559 description: "name already in use" 3560 schema: 3561 $ref: "#/definitions/ErrorResponse" 3562 500: 3563 description: "server error" 3564 schema: 3565 $ref: "#/definitions/ErrorResponse" 3566 parameters: 3567 - name: "id" 3568 in: "path" 3569 required: true 3570 description: "ID or name of the container" 3571 type: "string" 3572 - name: "name" 3573 in: "query" 3574 required: true 3575 description: "New name for the container" 3576 type: "string" 3577 tags: 3578 - "Container" 3579 /containers/{id}/pause: 3580 post: 3581 summary: "Pause a container" 3582 description: | 3583 Use the cgroups freezer to suspend all processes in a container. 3584 3585 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. 3586 operationId: "PostContainerPause" 3587 responses: 3588 204: 3589 description: "no error" 3590 404: 3591 description: "no such container" 3592 schema: 3593 $ref: "#/definitions/ErrorResponse" 3594 examples: 3595 application/json: 3596 message: "No such container: c2ada9df5af8" 3597 500: 3598 description: "server error" 3599 schema: 3600 $ref: "#/definitions/ErrorResponse" 3601 parameters: 3602 - name: "id" 3603 in: "path" 3604 required: true 3605 description: "ID or name of the container" 3606 type: "string" 3607 tags: 3608 - "Container" 3609 /containers/{id}/unpause: 3610 post: 3611 summary: "Unpause a container" 3612 description: "Resume a container which has been paused." 3613 operationId: "PostContainerUnpause" 3614 responses: 3615 204: 3616 description: "no error" 3617 404: 3618 description: "no such container" 3619 schema: 3620 $ref: "#/definitions/ErrorResponse" 3621 examples: 3622 application/json: 3623 message: "No such container: c2ada9df5af8" 3624 500: 3625 description: "server error" 3626 schema: 3627 $ref: "#/definitions/ErrorResponse" 3628 parameters: 3629 - name: "id" 3630 in: "path" 3631 required: true 3632 description: "ID or name of the container" 3633 type: "string" 3634 tags: 3635 - "Container" 3636 /containers/{id}/attach: 3637 post: 3638 summary: "Attach to a container" 3639 description: | 3640 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. 3641 3642 Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. 3643 3644 See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. 3645 3646 ### Hijacking 3647 3648 This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. 3649 3650 This is the response from the daemon for an attach request: 3651 3652 ``` 3653 HTTP/1.1 200 OK 3654 Content-Type: application/vnd.docker.raw-stream 3655 3656 [STREAM] 3657 ``` 3658 3659 After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. 3660 3661 To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. 3662 3663 For example, the client sends this request to upgrade the connection: 3664 3665 ``` 3666 POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 3667 Upgrade: tcp 3668 Connection: Upgrade 3669 ``` 3670 3671 The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: 3672 3673 ``` 3674 HTTP/1.1 101 UPGRADED 3675 Content-Type: application/vnd.docker.raw-stream 3676 Connection: Upgrade 3677 Upgrade: tcp 3678 3679 [STREAM] 3680 ``` 3681 3682 ### Stream format 3683 3684 When the TTY setting is disabled in [`POST /containers/create`](#operation/PostContainerCreate), 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. 3685 3686 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`). 3687 3688 It is encoded on the first eight bytes like this: 3689 3690 ```go 3691 header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} 3692 ``` 3693 3694 `STREAM_TYPE` can be: 3695 3696 - 0: `stdin` (is written on `stdout`) 3697 - 1: `stdout` 3698 - 2: `stderr` 3699 3700 `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. 3701 3702 Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. 3703 3704 The simplest way to implement this protocol is the following: 3705 3706 1. Read 8 bytes. 3707 2. Choose `stdout` or `stderr` depending on the first byte. 3708 3. Extract the frame size from the last four bytes. 3709 4. Read the extracted size and output it on the correct output. 3710 5. Goto 1. 3711 3712 ### Stream format when using a TTY 3713 3714 When the TTY setting is enabled in [`POST /containers/create`](#operation/PostContainerCreate), 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`. 3715 3716 operationId: "PostContainerAttach" 3717 produces: 3718 - "application/vnd.docker.raw-stream" 3719 responses: 3720 101: 3721 description: "no error, hints proxy about hijacking" 3722 200: 3723 description: "no error, no upgrade header found" 3724 400: 3725 description: "bad parameter" 3726 schema: 3727 $ref: "#/definitions/ErrorResponse" 3728 404: 3729 description: "no such container" 3730 schema: 3731 $ref: "#/definitions/ErrorResponse" 3732 examples: 3733 application/json: 3734 message: "No such container: c2ada9df5af8" 3735 500: 3736 description: "server error" 3737 schema: 3738 $ref: "#/definitions/ErrorResponse" 3739 parameters: 3740 - name: "id" 3741 in: "path" 3742 required: true 3743 description: "ID or name of the container" 3744 type: "string" 3745 - name: "detachKeys" 3746 in: "query" 3747 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 `_`." 3748 type: "string" 3749 - name: "logs" 3750 in: "query" 3751 description: | 3752 Replay previous logs from the container. 3753 3754 This is useful for attaching to a container that has started and you want to output everything since the container started. 3755 3756 If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. 3757 type: "boolean" 3758 default: false 3759 - name: "stream" 3760 in: "query" 3761 description: "Stream attached streams from the the time the request was made onwards" 3762 type: "boolean" 3763 default: false 3764 - name: "stdin" 3765 in: "query" 3766 description: "Attach to `stdin`" 3767 type: "boolean" 3768 default: false 3769 - name: "stdout" 3770 in: "query" 3771 description: "Attach to `stdout`" 3772 type: "boolean" 3773 default: false 3774 - name: "stderr" 3775 in: "query" 3776 description: "Attach to `stderr`" 3777 type: "boolean" 3778 default: false 3779 tags: 3780 - "Container" 3781 /containers/{id}/attach/ws: 3782 get: 3783 summary: "Attach to a container via a websocket" 3784 operationId: "PostContainerAttachWebsocket" 3785 responses: 3786 101: 3787 description: "no error, hints proxy about hijacking" 3788 200: 3789 description: "no error, no upgrade header found" 3790 400: 3791 description: "bad parameter" 3792 schema: 3793 $ref: "#/definitions/ErrorResponse" 3794 404: 3795 description: "no such container" 3796 schema: 3797 $ref: "#/definitions/ErrorResponse" 3798 examples: 3799 application/json: 3800 message: "No such container: c2ada9df5af8" 3801 500: 3802 description: "server error" 3803 schema: 3804 $ref: "#/definitions/ErrorResponse" 3805 parameters: 3806 - name: "id" 3807 in: "path" 3808 required: true 3809 description: "ID or name of the container" 3810 type: "string" 3811 - name: "detachKeys" 3812 in: "query" 3813 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 `_`." 3814 type: "string" 3815 - name: "logs" 3816 in: "query" 3817 description: "Return logs" 3818 type: "boolean" 3819 default: false 3820 - name: "stream" 3821 in: "query" 3822 description: "Return stream" 3823 type: "boolean" 3824 default: false 3825 - name: "stdin" 3826 in: "query" 3827 description: "Attach to `stdin`" 3828 type: "boolean" 3829 default: false 3830 - name: "stdout" 3831 in: "query" 3832 description: "Attach to `stdout`" 3833 type: "boolean" 3834 default: false 3835 - name: "stderr" 3836 in: "query" 3837 description: "Attach to `stderr`" 3838 type: "boolean" 3839 default: false 3840 tags: 3841 - "Container" 3842 /containers/{id}/wait: 3843 post: 3844 summary: "Wait for a container" 3845 description: "Block until a container stops, then returns the exit code." 3846 operationId: "ContainerWait" 3847 produces: ["application/json"] 3848 responses: 3849 200: 3850 description: "The container has exit." 3851 schema: 3852 type: "object" 3853 required: [StatusCode] 3854 properties: 3855 StatusCode: 3856 description: "Exit code of the container" 3857 type: "integer" 3858 x-nullable: false 3859 404: 3860 description: "no such container" 3861 schema: 3862 $ref: "#/definitions/ErrorResponse" 3863 examples: 3864 application/json: 3865 message: "No such container: c2ada9df5af8" 3866 500: 3867 description: "server error" 3868 schema: 3869 $ref: "#/definitions/ErrorResponse" 3870 parameters: 3871 - name: "id" 3872 in: "path" 3873 required: true 3874 description: "ID or name of the container" 3875 type: "string" 3876 tags: 3877 - "Container" 3878 /containers/{id}: 3879 delete: 3880 summary: "Remove a container" 3881 operationId: "DeleteContainer" 3882 responses: 3883 204: 3884 description: "no error" 3885 400: 3886 description: "bad parameter" 3887 schema: 3888 $ref: "#/definitions/ErrorResponse" 3889 404: 3890 description: "no such container" 3891 schema: 3892 $ref: "#/definitions/ErrorResponse" 3893 examples: 3894 application/json: 3895 message: "No such container: c2ada9df5af8" 3896 500: 3897 description: "server error" 3898 schema: 3899 $ref: "#/definitions/ErrorResponse" 3900 parameters: 3901 - name: "id" 3902 in: "path" 3903 required: true 3904 description: "ID or name of the container" 3905 type: "string" 3906 - name: "v" 3907 in: "query" 3908 description: "Remove the volumes associated with the container." 3909 type: "boolean" 3910 default: false 3911 - name: "force" 3912 in: "query" 3913 description: "If the container is running, kill it before removing it." 3914 type: "boolean" 3915 default: false 3916 tags: 3917 - "Container" 3918 /containers/{id}/archive: 3919 head: 3920 summary: "Get information about files in a container" 3921 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." 3922 operationId: "HeadContainerArchive" 3923 responses: 3924 200: 3925 description: "no error" 3926 headers: 3927 X-Docker-Container-Path-Stat: 3928 type: "string" 3929 description: "TODO" 3930 400: 3931 description: "Bad parameter" 3932 schema: 3933 allOf: 3934 - $ref: "#/definitions/ErrorResponse" 3935 - type: "object" 3936 properties: 3937 message: 3938 description: "The error message. Either \"must specify path parameter\" (path cannot be empty) or \"not a directory\" (path was asserted to be a directory but exists as a file)." 3939 type: "string" 3940 x-nullable: false 3941 404: 3942 description: "Container or path does not exist" 3943 schema: 3944 $ref: "#/definitions/ErrorResponse" 3945 examples: 3946 application/json: 3947 message: "No such container: c2ada9df5af8" 3948 500: 3949 description: "Server error" 3950 schema: 3951 $ref: "#/definitions/ErrorResponse" 3952 parameters: 3953 - name: "id" 3954 in: "path" 3955 required: true 3956 description: "ID or name of the container" 3957 type: "string" 3958 - name: "path" 3959 in: "query" 3960 required: true 3961 description: "Resource in the container’s filesystem to archive." 3962 type: "string" 3963 tags: 3964 - "Container" 3965 get: 3966 summary: "Get an archive of a filesystem resource in a container" 3967 description: "Get an tar archive of a resource in the filesystem of container id." 3968 operationId: "GetContainerArchive" 3969 produces: 3970 - "application/x-tar" 3971 responses: 3972 200: 3973 description: "no error" 3974 400: 3975 description: "Bad parameter" 3976 schema: 3977 allOf: 3978 - $ref: "#/definitions/ErrorResponse" 3979 - type: "object" 3980 properties: 3981 message: 3982 description: "The error message. Either \"must specify path parameter\" (path cannot be empty) or \"not a directory\" (path was asserted to be a directory but exists as a file)." 3983 type: "string" 3984 x-nullable: false 3985 404: 3986 description: "Container or path does not exist" 3987 schema: 3988 $ref: "#/definitions/ErrorResponse" 3989 examples: 3990 application/json: 3991 message: "No such container: c2ada9df5af8" 3992 500: 3993 description: "server error" 3994 schema: 3995 $ref: "#/definitions/ErrorResponse" 3996 parameters: 3997 - name: "id" 3998 in: "path" 3999 required: true 4000 description: "ID or name of the container" 4001 type: "string" 4002 - name: "path" 4003 in: "query" 4004 required: true 4005 description: "Resource in the container’s filesystem to archive." 4006 type: "string" 4007 tags: 4008 - "Container" 4009 put: 4010 summary: "Extract an archive of files or folders to a directory in a container" 4011 description: "Upload a tar archive to be extracted to a path in the filesystem of container id." 4012 operationId: "PutContainerArchive" 4013 consumes: 4014 - "application/x-tar" 4015 - "application/octet-stream" 4016 responses: 4017 200: 4018 description: "The content was extracted successfully" 4019 400: 4020 description: "Bad parameter" 4021 schema: 4022 $ref: "#/definitions/ErrorResponse" 4023 403: 4024 description: "Permission denied, the volume or container rootfs is marked as read-only." 4025 schema: 4026 $ref: "#/definitions/ErrorResponse" 4027 404: 4028 description: "No such container or path does not exist inside the container" 4029 schema: 4030 $ref: "#/definitions/ErrorResponse" 4031 examples: 4032 application/json: 4033 message: "No such container: c2ada9df5af8" 4034 500: 4035 description: "Server error" 4036 schema: 4037 $ref: "#/definitions/ErrorResponse" 4038 parameters: 4039 - name: "id" 4040 in: "path" 4041 required: true 4042 description: "ID or name of the container" 4043 type: "string" 4044 - name: "path" 4045 in: "query" 4046 required: true 4047 description: "Path to a directory in the container to extract the archive’s contents into. " 4048 type: "string" 4049 - name: "noOverwriteDirNonDir" 4050 in: "query" 4051 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." 4052 type: "string" 4053 - name: "inputStream" 4054 in: "body" 4055 required: true 4056 description: "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." 4057 schema: 4058 type: "string" 4059 tags: 4060 - "Container" 4061 /containers/prune: 4062 post: 4063 summary: "Delete stopped containers" 4064 consumes: 4065 - "application/json" 4066 produces: 4067 - "application/json" 4068 operationId: "ContainerPrune" 4069 responses: 4070 200: 4071 description: "No error" 4072 schema: 4073 type: "object" 4074 properties: 4075 ContainersDeleted: 4076 description: "Container IDs that were deleted" 4077 type: "array" 4078 items: 4079 type: "string" 4080 SpaceReclaimed: 4081 description: "Disk space reclaimed in bytes" 4082 type: "integer" 4083 format: "int64" 4084 500: 4085 description: "Server error" 4086 schema: 4087 $ref: "#/definitions/ErrorResponse" 4088 tags: 4089 - "Container" 4090 /images/json: 4091 get: 4092 summary: "List Images" 4093 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." 4094 operationId: "GetImageList" 4095 produces: 4096 - "application/json" 4097 responses: 4098 200: 4099 description: "Summary image data for the images matching the query" 4100 schema: 4101 type: "array" 4102 items: 4103 $ref: "#/definitions/ImageSummary" 4104 examples: 4105 application/json: 4106 - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" 4107 ParentId: "" 4108 RepoTags: 4109 - "ubuntu:12.04" 4110 - "ubuntu:precise" 4111 RepoDigests: 4112 - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787" 4113 Created: 1474925151 4114 Size: 103579269 4115 VirtualSize: 103579269 4116 SharedSize: 0 4117 Labels: {} 4118 Containers: 2 4119 - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175" 4120 ParentId: "" 4121 RepoTags: 4122 - "ubuntu:12.10" 4123 - "ubuntu:quantal" 4124 RepoDigests: 4125 - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7" 4126 - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3" 4127 Created: 1403128455 4128 Size: 172064416 4129 VirtualSize: 172064416 4130 SharedSize: 0 4131 Labels: {} 4132 Containers: 5 4133 500: 4134 description: "server error" 4135 schema: 4136 $ref: "#/definitions/ErrorResponse" 4137 parameters: 4138 - name: "all" 4139 in: "query" 4140 description: "Show all images. Only images from a final layer (no children) are shown by default." 4141 type: "boolean" 4142 default: false 4143 - name: "filters" 4144 in: "query" 4145 description: "A JSON encoded value of the filters (a `map[string][]string`) to process on the containers list" 4146 type: "string" 4147 - name: "filter" 4148 in: "query" 4149 description: "Only return images with the specified name." 4150 type: "string" 4151 - name: "digests" 4152 in: "query" 4153 description: "Show digest information as a `RepoDigests` field on each image." 4154 type: "boolean" 4155 default: false 4156 tags: 4157 - "Image" 4158 /build: 4159 post: 4160 summary: "Build an image" 4161 description: | 4162 Build an image from a tar archive with a `Dockerfile` in it. 4163 4164 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/). 4165 4166 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. 4167 4168 The build is canceled if the client drops the connection by quitting or being killed. 4169 operationId: "PostImageBuild" 4170 consumes: 4171 - "application/octet-stream" 4172 produces: 4173 - "application/json" 4174 parameters: 4175 - name: "inputStream" 4176 in: "body" 4177 description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." 4178 schema: 4179 type: "string" 4180 format: "binary" 4181 - name: "dockerfile" 4182 in: "query" 4183 description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." 4184 type: "string" 4185 default: "Dockerfile" 4186 - name: "t" 4187 in: "query" 4188 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." 4189 type: "string" 4190 - name: "remote" 4191 in: "query" 4192 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." 4193 type: "string" 4194 - name: "q" 4195 in: "query" 4196 description: "Suppress verbose build output." 4197 type: "boolean" 4198 default: false 4199 - name: "nocache" 4200 in: "query" 4201 description: "Do not use the cache when building the image." 4202 type: "boolean" 4203 default: false 4204 - name: "cachefrom" 4205 in: "query" 4206 description: "JSON array of images used for build cache resolution." 4207 type: "string" 4208 - name: "pull" 4209 in: "query" 4210 description: "Attempt to pull the image even if an older image exists locally." 4211 type: "string" 4212 - name: "rm" 4213 in: "query" 4214 description: "Remove intermediate containers after a successful build." 4215 type: "boolean" 4216 default: true 4217 - name: "forcerm" 4218 in: "query" 4219 description: "Always remove intermediate containers, even upon failure." 4220 type: "boolean" 4221 default: false 4222 - name: "memory" 4223 in: "query" 4224 description: "Set memory limit for build." 4225 type: "integer" 4226 - name: "memswap" 4227 in: "query" 4228 description: "Total memory (memory + swap). Set as `-1` to disable swap." 4229 type: "integer" 4230 - name: "cpushares" 4231 in: "query" 4232 description: "CPU shares (relative weight)." 4233 type: "integer" 4234 - name: "cpusetcpus" 4235 in: "query" 4236 description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." 4237 type: "string" 4238 - name: "cpuperiod" 4239 in: "query" 4240 description: "The length of a CPU period in microseconds." 4241 type: "integer" 4242 - name: "cpuquota" 4243 in: "query" 4244 description: "Microseconds of CPU time that the container can get in a CPU period." 4245 type: "integer" 4246 - name: "buildargs" 4247 in: "query" 4248 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)" 4249 type: "integer" 4250 - name: "shmsize" 4251 in: "query" 4252 description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." 4253 type: "integer" 4254 - name: "squash" 4255 in: "query" 4256 description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" 4257 type: "boolean" 4258 - name: "labels" 4259 in: "query" 4260 description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." 4261 type: "string" 4262 - name: "networkmode" 4263 in: "query" 4264 description: "Sets the networking mode for the run commands during 4265 build. Supported standard values are: `bridge`, `host`, `none`, and 4266 `container:<name|id>`. Any other value is taken as a custom network's 4267 name to which this container should connect to." 4268 type: "string" 4269 - name: "Content-type" 4270 in: "header" 4271 type: "string" 4272 enum: 4273 - "application/tar" 4274 default: "application/tar" 4275 - name: "X-Registry-Config" 4276 in: "header" 4277 description: | 4278 This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. 4279 4280 The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: 4281 4282 ``` 4283 { 4284 "docker.example.com": { 4285 "username": "janedoe", 4286 "password": "hunter2" 4287 }, 4288 "https://index.docker.io/v1/": { 4289 "username": "mobydock", 4290 "password": "conta1n3rize14" 4291 } 4292 } 4293 ``` 4294 4295 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. 4296 type: "string" 4297 responses: 4298 200: 4299 description: "no error" 4300 500: 4301 description: "server error" 4302 schema: 4303 $ref: "#/definitions/ErrorResponse" 4304 tags: 4305 - "Image" 4306 /images/create: 4307 post: 4308 summary: "Create an image" 4309 description: "Create an image by either pulling it from a registry or importing it." 4310 operationId: "PostImageCreate" 4311 consumes: 4312 - "text/plain" 4313 - "application/octet-stream" 4314 produces: 4315 - "application/json" 4316 responses: 4317 200: 4318 description: "no error" 4319 500: 4320 description: "server error" 4321 schema: 4322 $ref: "#/definitions/ErrorResponse" 4323 parameters: 4324 - name: "fromImage" 4325 in: "query" 4326 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." 4327 type: "string" 4328 - name: "fromSrc" 4329 in: "query" 4330 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." 4331 type: "string" 4332 - name: "repo" 4333 in: "query" 4334 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." 4335 type: "string" 4336 - name: "tag" 4337 in: "query" 4338 description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." 4339 type: "string" 4340 - name: "inputImage" 4341 in: "body" 4342 description: "Image content if the value `-` has been specified in fromSrc query parameter" 4343 schema: 4344 type: "string" 4345 required: false 4346 - name: "X-Registry-Auth" 4347 in: "header" 4348 description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" 4349 type: "string" 4350 tags: 4351 - "Image" 4352 /images/{name}/json: 4353 get: 4354 summary: "Inspect an image" 4355 description: "Return low-level information about an image." 4356 operationId: "GetImageInspect" 4357 produces: 4358 - "application/json" 4359 responses: 4360 200: 4361 description: "No error" 4362 schema: 4363 $ref: "#/definitions/Image" 4364 examples: 4365 application/json: 4366 Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" 4367 Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a" 4368 Comment: "" 4369 Os: "linux" 4370 Architecture: "amd64" 4371 Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" 4372 ContainerConfig: 4373 Tty: false 4374 Hostname: "e611e15f9c9d" 4375 Domainname: "" 4376 AttachStdout: false 4377 PublishService: "" 4378 AttachStdin: false 4379 OpenStdin: false 4380 StdinOnce: false 4381 NetworkDisabled: false 4382 OnBuild: [] 4383 Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" 4384 User: "" 4385 WorkingDir: "" 4386 MacAddress: "" 4387 AttachStderr: false 4388 Labels: 4389 com.example.license: "GPL" 4390 com.example.version: "1.0" 4391 com.example.vendor: "Acme" 4392 Env: 4393 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 4394 Cmd: 4395 - "/bin/sh" 4396 - "-c" 4397 - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0" 4398 DockerVersion: "1.9.0-dev" 4399 VirtualSize: 188359297 4400 Size: 0 4401 Author: "" 4402 Created: "2015-09-10T08:30:53.26995814Z" 4403 GraphDriver: 4404 Name: "aufs" 4405 RepoDigests: 4406 - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf" 4407 RepoTags: 4408 - "example:1.0" 4409 - "example:latest" 4410 - "example:stable" 4411 Config: 4412 Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" 4413 NetworkDisabled: false 4414 OnBuild: [] 4415 StdinOnce: false 4416 PublishService: "" 4417 AttachStdin: false 4418 OpenStdin: false 4419 Domainname: "" 4420 AttachStdout: false 4421 Tty: false 4422 Hostname: "e611e15f9c9d" 4423 Cmd: 4424 - "/bin/bash" 4425 Env: 4426 - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 4427 Labels: 4428 com.example.vendor: "Acme" 4429 com.example.version: "1.0" 4430 com.example.license: "GPL" 4431 MacAddress: "" 4432 AttachStderr: false 4433 WorkingDir: "" 4434 User: "" 4435 RootFS: 4436 Type: "layers" 4437 Layers: 4438 - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" 4439 - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" 4440 404: 4441 description: "No such image" 4442 schema: 4443 $ref: "#/definitions/ErrorResponse" 4444 examples: 4445 application/json: 4446 message: "No such image: someimage (tag: latest)" 4447 500: 4448 description: "Server error" 4449 schema: 4450 $ref: "#/definitions/ErrorResponse" 4451 parameters: 4452 - name: "name" 4453 in: "path" 4454 description: "Image name or id" 4455 type: "string" 4456 required: true 4457 tags: 4458 - "Image" 4459 /images/{name}/history: 4460 get: 4461 summary: "Get the history of an image" 4462 description: "Return parent layers of an image." 4463 operationId: "GetImageHistory" 4464 produces: 4465 - "application/json" 4466 responses: 4467 200: 4468 description: "No error" 4469 schema: 4470 type: "array" 4471 items: 4472 type: "object" 4473 properties: 4474 Id: 4475 type: "string" 4476 Created: 4477 type: "integer" 4478 format: "int64" 4479 CreatedBy: 4480 type: "string" 4481 Tags: 4482 type: "array" 4483 items: 4484 type: "string" 4485 Size: 4486 type: "integer" 4487 format: "int64" 4488 Comment: 4489 type: "string" 4490 examples: 4491 application/json: 4492 - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" 4493 Created: 1398108230 4494 CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" 4495 Tags: 4496 - "ubuntu:lucid" 4497 - "ubuntu:10.04" 4498 Size: 182964289 4499 Comment: "" 4500 - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" 4501 Created: 1398108222 4502 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/" 4503 Tags: [] 4504 Size: 0 4505 Comment: "" 4506 - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" 4507 Created: 1371157430 4508 CreatedBy: "" 4509 Tags: 4510 - "scratch12:latest" 4511 - "scratch:latest" 4512 Size: 0 4513 Comment: "Imported from -" 4514 404: 4515 description: "No such image" 4516 schema: 4517 $ref: "#/definitions/ErrorResponse" 4518 500: 4519 description: "Server error" 4520 schema: 4521 $ref: "#/definitions/ErrorResponse" 4522 parameters: 4523 - name: "name" 4524 in: "path" 4525 description: "Image name or ID" 4526 type: "string" 4527 required: true 4528 tags: 4529 - "Image" 4530 /images/{name}/push: 4531 post: 4532 summary: "Push an image" 4533 description: | 4534 Push an image to a registry. 4535 4536 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`. 4537 4538 The push is cancelled if the HTTP connection is closed. 4539 operationId: "PostImagePush" 4540 consumes: 4541 - "application/octet-stream" 4542 responses: 4543 200: 4544 description: "No error" 4545 404: 4546 description: "No such image" 4547 schema: 4548 $ref: "#/definitions/ErrorResponse" 4549 500: 4550 description: "Server error" 4551 schema: 4552 $ref: "#/definitions/ErrorResponse" 4553 parameters: 4554 - name: "name" 4555 in: "path" 4556 description: "Image name or ID." 4557 type: "string" 4558 required: true 4559 - name: "tag" 4560 in: "query" 4561 description: "The tag to associate with the image on the registry." 4562 type: "string" 4563 - name: "X-Registry-Auth" 4564 in: "header" 4565 description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" 4566 type: "string" 4567 required: true 4568 tags: 4569 - "Image" 4570 /images/{name}/tag: 4571 post: 4572 summary: "Tag an image" 4573 description: "Tag an image so that it becomes part of a repository." 4574 operationId: "PostImageTag" 4575 responses: 4576 201: 4577 description: "No error" 4578 400: 4579 description: "Bad parameter" 4580 schema: 4581 $ref: "#/definitions/ErrorResponse" 4582 404: 4583 description: "No such image" 4584 schema: 4585 $ref: "#/definitions/ErrorResponse" 4586 409: 4587 description: "Conflict" 4588 schema: 4589 $ref: "#/definitions/ErrorResponse" 4590 500: 4591 description: "Server error" 4592 schema: 4593 $ref: "#/definitions/ErrorResponse" 4594 parameters: 4595 - name: "name" 4596 in: "path" 4597 description: "Image name or ID to tag." 4598 type: "string" 4599 required: true 4600 - name: "repo" 4601 in: "query" 4602 description: "The repository to tag in. For example, `someuser/someimage`." 4603 type: "string" 4604 - name: "tag" 4605 in: "query" 4606 description: "The name of the new tag." 4607 type: "string" 4608 tags: 4609 - "Image" 4610 /images/{name}: 4611 delete: 4612 summary: "Remove an image" 4613 description: | 4614 Remove an image, along with any untagged parent images that were referenced by that image. 4615 4616 Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. 4617 operationId: "DeleteImage" 4618 produces: 4619 - "application/json" 4620 responses: 4621 200: 4622 description: "No error" 4623 schema: 4624 type: "array" 4625 items: 4626 $ref: "#/definitions/ImageDeleteResponse" 4627 examples: 4628 application/json: 4629 - Untagged: "3e2f21a89f" 4630 - Deleted: "3e2f21a89f" 4631 - Deleted: "53b4f83ac9" 4632 404: 4633 description: "No such image" 4634 schema: 4635 $ref: "#/definitions/ErrorResponse" 4636 409: 4637 description: "Conflict" 4638 schema: 4639 $ref: "#/definitions/ErrorResponse" 4640 500: 4641 description: "Server error" 4642 schema: 4643 $ref: "#/definitions/ErrorResponse" 4644 parameters: 4645 - name: "name" 4646 in: "path" 4647 description: "Image name or ID" 4648 type: "string" 4649 required: true 4650 - name: "force" 4651 in: "query" 4652 description: "Remove the image even if it is being used by stopped containers or has other tags" 4653 type: "boolean" 4654 default: false 4655 - name: "noprune" 4656 in: "query" 4657 description: "Do not delete untagged parent images" 4658 type: "boolean" 4659 default: false 4660 tags: 4661 - "Image" 4662 /images/search: 4663 get: 4664 summary: "Search images" 4665 description: "Search for an image on Docker Hub." 4666 operationId: "GetImageSearch" 4667 produces: 4668 - "application/json" 4669 responses: 4670 200: 4671 description: "No error" 4672 schema: 4673 type: "array" 4674 items: 4675 type: "object" 4676 properties: 4677 description: 4678 type: "string" 4679 is_official: 4680 type: "boolean" 4681 is_automated: 4682 type: "boolean" 4683 name: 4684 type: "string" 4685 star_count: 4686 type: "integer" 4687 examples: 4688 application/json: 4689 - description: "" 4690 is_official: false 4691 is_automated: false 4692 name: "wma55/u1210sshd" 4693 star_count: 0 4694 - description: "" 4695 is_official: false 4696 is_automated: false 4697 name: "jdswinbank/sshd" 4698 star_count: 0 4699 - description: "" 4700 is_official: false 4701 is_automated: false 4702 name: "vgauthier/sshd" 4703 star_count: 0 4704 500: 4705 description: "Server error" 4706 schema: 4707 $ref: "#/definitions/ErrorResponse" 4708 parameters: 4709 - name: "term" 4710 in: "query" 4711 description: "Term to search" 4712 type: "string" 4713 required: true 4714 - name: "limit" 4715 in: "query" 4716 description: "Maximum number of results to return" 4717 type: "integer" 4718 - name: "filters" 4719 in: "query" 4720 description: | 4721 A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: 4722 4723 - `stars=<number>` 4724 - `is-automated=(true|false)` 4725 - `is-official=(true|false)` 4726 type: "string" 4727 tags: 4728 - "Image" 4729 /images/prune: 4730 post: 4731 summary: "Delete unused images" 4732 consumes: 4733 - "application/json" 4734 produces: 4735 - "application/json" 4736 operationId: "ImagePrune" 4737 parameters: 4738 - name: "body" 4739 in: "body" 4740 schema: 4741 type: "object" 4742 properties: 4743 DanglingOnly: 4744 description: "Only delete unused *and* untagged images" 4745 type: "boolean" 4746 default: false 4747 responses: 4748 200: 4749 description: "No error" 4750 schema: 4751 type: "object" 4752 properties: 4753 ImagesDeleted: 4754 description: "Images that were deleted" 4755 type: "array" 4756 items: 4757 $ref: "#/definitions/ImageDeleteResponse" 4758 SpaceReclaimed: 4759 description: "Disk space reclaimed in bytes" 4760 type: "integer" 4761 format: "int64" 4762 500: 4763 description: "Server error" 4764 schema: 4765 $ref: "#/definitions/ErrorResponse" 4766 tags: 4767 - "Image" 4768 /auth: 4769 post: 4770 summary: "Check auth configuration" 4771 description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password." 4772 operationId: "Authenticate" 4773 consumes: ["application/json"] 4774 produces: ["application/json"] 4775 responses: 4776 200: 4777 description: "An identity token was generated successfully." 4778 schema: 4779 type: "object" 4780 required: [Status] 4781 properties: 4782 Status: 4783 description: "The status of the authentication" 4784 type: "string" 4785 x-nullable: false 4786 IdentityToken: 4787 description: "An opaque token used to authenticate a user after a successful login" 4788 type: "string" 4789 x-nullable: false 4790 examples: 4791 application/json: 4792 Status: "Login Succeeded" 4793 IdentityToken: "9cbaf023786cd7..." 4794 204: 4795 description: "No error" 4796 500: 4797 description: "Server error" 4798 schema: 4799 $ref: "#/definitions/ErrorResponse" 4800 parameters: 4801 - name: "authConfig" 4802 in: "body" 4803 description: "Authentication to check" 4804 schema: 4805 $ref: "#/definitions/AuthConfig" 4806 tags: ["Registry"] 4807 /info: 4808 get: 4809 summary: "Get system information" 4810 operationId: "getSystemInformation" 4811 produces: 4812 - "application/json" 4813 responses: 4814 200: 4815 description: "No error" 4816 schema: 4817 type: "object" 4818 properties: 4819 Architecture: 4820 type: "string" 4821 Containers: 4822 type: "integer" 4823 ContainersRunning: 4824 type: "integer" 4825 ContainersStopped: 4826 type: "integer" 4827 ContainersPaused: 4828 type: "integer" 4829 CpuCfsPeriod: 4830 type: "boolean" 4831 CpuCfsQuota: 4832 type: "boolean" 4833 Debug: 4834 type: "boolean" 4835 DiscoveryBackend: 4836 type: "string" 4837 DockerRootDir: 4838 type: "string" 4839 Driver: 4840 type: "string" 4841 DriverStatus: 4842 type: "array" 4843 items: 4844 type: "array" 4845 items: 4846 type: "string" 4847 SystemStatus: 4848 type: "array" 4849 items: 4850 type: "array" 4851 items: 4852 type: "string" 4853 Plugins: 4854 type: "object" 4855 properties: 4856 Volume: 4857 type: "array" 4858 items: 4859 type: "string" 4860 Network: 4861 type: "array" 4862 items: 4863 type: "string" 4864 ExperimentalBuild: 4865 type: "boolean" 4866 HttpProxy: 4867 type: "string" 4868 HttpsProxy: 4869 type: "string" 4870 ID: 4871 type: "string" 4872 IPv4Forwarding: 4873 type: "boolean" 4874 Images: 4875 type: "integer" 4876 IndexServerAddress: 4877 type: "string" 4878 InitPath: 4879 type: "string" 4880 InitSha1: 4881 type: "string" 4882 KernelVersion: 4883 type: "string" 4884 Labels: 4885 type: "array" 4886 items: 4887 type: "string" 4888 MemTotal: 4889 type: "integer" 4890 MemoryLimit: 4891 type: "boolean" 4892 NCPU: 4893 type: "integer" 4894 NEventsListener: 4895 type: "integer" 4896 NFd: 4897 type: "integer" 4898 NGoroutines: 4899 type: "integer" 4900 Name: 4901 type: "string" 4902 NoProxy: 4903 type: "string" 4904 OomKillDisable: 4905 type: "boolean" 4906 OSType: 4907 type: "string" 4908 OomScoreAdj: 4909 type: "integer" 4910 OperatingSystem: 4911 type: "string" 4912 RegistryConfig: 4913 type: "object" 4914 properties: 4915 IndexConfigs: 4916 type: "object" 4917 additionalProperties: 4918 type: "object" 4919 properties: 4920 Mirrors: 4921 type: "array" 4922 items: 4923 type: "string" 4924 Name: 4925 type: "string" 4926 Official: 4927 type: "boolean" 4928 Secure: 4929 type: "boolean" 4930 InsecureRegistryCIDRs: 4931 type: "array" 4932 items: 4933 type: "string" 4934 SwapLimit: 4935 type: "boolean" 4936 SystemTime: 4937 type: "string" 4938 ServerVersion: 4939 type: "string" 4940 examples: 4941 application/json: 4942 Architecture: "x86_64" 4943 ClusterStore: "etcd://localhost:2379" 4944 CgroupDriver: "cgroupfs" 4945 Containers: 11 4946 ContainersRunning: 7 4947 ContainersStopped: 3 4948 ContainersPaused: 1 4949 CpuCfsPeriod: true 4950 CpuCfsQuota: true 4951 Debug: false 4952 DockerRootDir: "/var/lib/docker" 4953 Driver: "btrfs" 4954 DriverStatus: 4955 - 4956 - "" 4957 ExperimentalBuild: false 4958 HttpProxy: "http://test:test@localhost:8080" 4959 HttpsProxy: "https://test:test@localhost:8080" 4960 ID: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" 4961 IPv4Forwarding: true 4962 Images: 16 4963 IndexServerAddress: "https://index.docker.io/v1/" 4964 InitPath: "/usr/bin/docker" 4965 InitSha1: "" 4966 KernelMemory: true 4967 KernelVersion: "3.12.0-1-amd64" 4968 Labels: 4969 - "storage=ssd" 4970 MemTotal: 2099236864 4971 MemoryLimit: true 4972 NCPU: 1 4973 NEventsListener: 0 4974 NFd: 11 4975 NGoroutines: 21 4976 Name: "prod-server-42" 4977 NoProxy: "9.81.1.160" 4978 OomKillDisable: true 4979 OSType: "linux" 4980 OperatingSystem: "Boot2Docker" 4981 Plugins: 4982 Volume: 4983 - "local" 4984 Network: 4985 - "null" 4986 - "host" 4987 - "bridge" 4988 RegistryConfig: 4989 IndexConfigs: 4990 docker.io: 4991 Name: "docker.io" 4992 Official: true 4993 Secure: true 4994 InsecureRegistryCIDRs: 4995 - "127.0.0.0/8" 4996 SecurityOptions: 4997 - Key: "Name" 4998 Value: "seccomp" 4999 - Key: "Profile" 5000 Value: "default" 5001 - Key: "Name" 5002 Value: "apparmor" 5003 - Key: "Name" 5004 Value: "selinux" 5005 - Key: "Name" 5006 Value: "userns" 5007 ServerVersion: "1.9.0" 5008 SwapLimit: false 5009 SystemStatus: 5010 - 5011 - "State" 5012 - "Healthy" 5013 SystemTime: "2015-03-10T11:11:23.730591467-07:00" 5014 500: 5015 description: "Server error" 5016 schema: 5017 $ref: "#/definitions/ErrorResponse" 5018 tags: 5019 - "Misc" 5020 /version: 5021 get: 5022 summary: "Get version" 5023 description: "Returns the version of Docker that is running and various information about the system that Docker is running on." 5024 operationId: "getVersion" 5025 produces: 5026 - "application/json" 5027 responses: 5028 200: 5029 description: "no error" 5030 schema: 5031 type: "object" 5032 properties: 5033 Version: 5034 type: "string" 5035 ApiVersion: 5036 type: "string" 5037 MinAPIVersion: 5038 type: "string" 5039 GitCommit: 5040 type: "string" 5041 GoVersion: 5042 type: "string" 5043 Os: 5044 type: "string" 5045 Arch: 5046 type: "string" 5047 KernelVersion: 5048 type: "string" 5049 Experimental: 5050 type: "boolean" 5051 BuildTime: 5052 type: "string" 5053 examples: 5054 application/json: 5055 Version: "1.13.0" 5056 Os: "linux" 5057 KernelVersion: "3.19.0-23-generic" 5058 GoVersion: "go1.6.3" 5059 GitCommit: "deadbee" 5060 Arch: "amd64" 5061 ApiVersion: "1.25" 5062 MinAPIVersion: "1.12" 5063 BuildTime: "2016-06-14T07:09:13.444803460+00:00" 5064 Experimental: true 5065 500: 5066 description: "server error" 5067 schema: 5068 $ref: "#/definitions/ErrorResponse" 5069 tags: 5070 - "Misc" 5071 /_ping: 5072 get: 5073 summary: "Ping" 5074 description: "This is a dummy endpoint you can use to test if the server is accessible." 5075 operationId: "ping" 5076 produces: 5077 - "text/plain" 5078 responses: 5079 200: 5080 description: "no error" 5081 schema: 5082 type: "string" 5083 example: "OK" 5084 500: 5085 description: "server error" 5086 schema: 5087 $ref: "#/definitions/ErrorResponse" 5088 tags: 5089 - "Misc" 5090 /commit: 5091 post: 5092 summary: "Create a new image from a container" 5093 operationId: "PostImageCommit" 5094 consumes: 5095 - "application/json" 5096 produces: 5097 - "application/json" 5098 responses: 5099 201: 5100 description: "no error" 5101 schema: 5102 $ref: "#/definitions/IdResponse" 5103 404: 5104 description: "no such container" 5105 schema: 5106 $ref: "#/definitions/ErrorResponse" 5107 examples: 5108 application/json: 5109 message: "No such container: c2ada9df5af8" 5110 500: 5111 description: "server error" 5112 schema: 5113 $ref: "#/definitions/ErrorResponse" 5114 parameters: 5115 - name: "containerConfig" 5116 in: "body" 5117 description: "The container configuration" 5118 schema: 5119 $ref: "#/definitions/Config" 5120 - name: "container" 5121 in: "query" 5122 description: "The ID or name of the container to commit" 5123 type: "string" 5124 - name: "repo" 5125 in: "query" 5126 description: "Repository name for the created image" 5127 type: "string" 5128 - name: "tag" 5129 in: "query" 5130 description: "Tag name for the create image" 5131 type: "string" 5132 - name: "comment" 5133 in: "query" 5134 description: "Commit message" 5135 type: "string" 5136 - name: "author" 5137 in: "query" 5138 description: "Author of the image (e.g., `John Hannibal Smith <hannibal@a-team.com>`)" 5139 type: "string" 5140 - name: "pause" 5141 in: "query" 5142 description: "Whether to pause the container before committing" 5143 type: "boolean" 5144 default: true 5145 - name: "changes" 5146 in: "query" 5147 description: "`Dockerfile` instructions to apply while committing" 5148 type: "string" 5149 tags: 5150 - "Image" 5151 /events: 5152 get: 5153 summary: "Monitor events" 5154 description: | 5155 Stream real-time events from the server. 5156 5157 Various objects within Docker report events when something happens to them. 5158 5159 Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update` 5160 5161 Images report these events: `delete, import, load, pull, push, save, tag, untag` 5162 5163 Volumes report these events: `create, mount, unmount, destroy` 5164 5165 Networks report these events: `create, connect, disconnect, destroy` 5166 5167 The Docker daemon reports these events: `reload` 5168 5169 operationId: "getEvents" 5170 produces: 5171 - "application/json" 5172 responses: 5173 200: 5174 description: "no error" 5175 schema: 5176 type: "object" 5177 properties: 5178 Type: 5179 description: "The type of object emitting the event" 5180 type: "string" 5181 Action: 5182 description: "The type of event" 5183 type: "string" 5184 Actor: 5185 type: "object" 5186 properties: 5187 ID: 5188 description: "The ID of the object emitting the event" 5189 type: "string" 5190 Attributes: 5191 description: "Various key/value attributes of the object, depending on its type" 5192 type: "object" 5193 additionalProperties: 5194 type: "string" 5195 time: 5196 description: "Timestamp of event" 5197 type: "integer" 5198 timeNano: 5199 description: "Timestamp of event, with nanosecond accuracy" 5200 type: "integer" 5201 format: "int64" 5202 examples: 5203 application/json: 5204 Type: "container" 5205 Action: "create" 5206 Actor: 5207 ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" 5208 Attributes: 5209 com.example.some-label: "some-label-value" 5210 image: "alpine" 5211 name: "my-container" 5212 time: 1461943101 5213 500: 5214 description: "server error" 5215 schema: 5216 $ref: "#/definitions/ErrorResponse" 5217 parameters: 5218 - name: "since" 5219 in: "query" 5220 description: "Show events created since this timestamp then stream new events." 5221 type: "string" 5222 - name: "until" 5223 in: "query" 5224 description: "Show events created until this timestamp then stop streaming." 5225 type: "string" 5226 - name: "filters" 5227 in: "query" 5228 description: | 5229 A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: 5230 5231 - `container=<string>` container name or ID 5232 - `event=<string>` event type 5233 - `image=<string>` image name or ID 5234 - `label=<string>` image or container label 5235 - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` 5236 - `volume=<string>` volume name or ID 5237 - `network=<string>` network name or ID 5238 - `daemon=<string>` daemon name or ID 5239 type: "string" 5240 tags: 5241 - "Misc" 5242 /system/df: 5243 get: 5244 summary: "Get data usage information" 5245 responses: 5246 200: 5247 description: "no error" 5248 schema: 5249 type: "object" 5250 properties: 5251 LayersSize: 5252 type: "integer" 5253 format: "int64" 5254 Images: 5255 type: "array" 5256 items: 5257 $ref: "#/definitions/ImageSummary" 5258 Containers: 5259 type: "array" 5260 items: 5261 $ref: "#/definitions/ContainerSummary" 5262 Volumes: 5263 type: "array" 5264 items: 5265 $ref: "#/definitions/Volume" 5266 example: 5267 LayersSize: 1092588 5268 Images: 5269 - 5270 Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 5271 ParentId: "" 5272 RepoTags: 5273 - "busybox:latest" 5274 RepoDigests: 5275 - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" 5276 Created: 1466724217 5277 Size: 1092588 5278 SharedSize: 0 5279 VirtualSize: 1092588 5280 Labels: {} 5281 Containers: 1 5282 Containers: 5283 - 5284 Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" 5285 Names: 5286 - "/top" 5287 Image: "busybox" 5288 ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" 5289 Command: "top" 5290 Created: 1472592424 5291 Ports: [] 5292 SizeRootFs: 1092588 5293 Labels: {} 5294 State: "exited" 5295 Status: "Exited (0) 56 minutes ago" 5296 HostConfig: 5297 NetworkMode: "default" 5298 NetworkSettings: 5299 Networks: 5300 bridge: 5301 IPAMConfig: null 5302 Links: null 5303 Aliases: null 5304 NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" 5305 EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" 5306 Gateway: "172.18.0.1" 5307 IPAddress: "172.18.0.2" 5308 IPPrefixLen: 16 5309 IPv6Gateway: "" 5310 GlobalIPv6Address: "" 5311 GlobalIPv6PrefixLen: 0 5312 MacAddress: "02:42:ac:12:00:02" 5313 Mounts: [] 5314 Volumes: 5315 - 5316 Name: "my-volume" 5317 Driver: "local" 5318 Mountpoint: "" 5319 Labels: null 5320 Scope: "" 5321 Options: null 5322 UsageData: 5323 Size: 0 5324 RefCount: 0 5325 500: 5326 description: "server error" 5327 schema: 5328 $ref: "#/definitions/ErrorResponse" 5329 tags: 5330 - "Misc" 5331 /images/{name}/get: 5332 get: 5333 summary: "Export an image" 5334 description: | 5335 Get a tarball containing all images and metadata for a repository. 5336 5337 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. 5338 5339 ### Image tarball format 5340 5341 An image tarball contains one directory per image layer (named using its long ID), each containing these files: 5342 5343 - `VERSION`: currently `1.0` - the file format version 5344 - `json`: detailed layer information, similar to `docker inspect layer_id` 5345 - `layer.tar`: A tarfile containing the filesystem changes in this layer 5346 5347 The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. 5348 5349 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. 5350 5351 ```json 5352 { 5353 "hello-world": { 5354 "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" 5355 } 5356 } 5357 ``` 5358 operationId: "GetImage" 5359 produces: 5360 - "application/x-tar" 5361 responses: 5362 200: 5363 description: "no error" 5364 schema: 5365 type: "string" 5366 format: "binary" 5367 500: 5368 description: "server error" 5369 schema: 5370 $ref: "#/definitions/ErrorResponse" 5371 parameters: 5372 - name: "name" 5373 in: "path" 5374 description: "Image name or ID" 5375 type: "string" 5376 required: true 5377 tags: 5378 - "Image" 5379 /images/get: 5380 get: 5381 summary: "Export several images" 5382 description: | 5383 Get a tarball containing all images and metadata for several image repositories. 5384 5385 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. 5386 5387 For details on the format, see [the export image endpoint](#operation/GetImage). 5388 operationId: "GetImageSaveAll" 5389 produces: 5390 - "application/x-tar" 5391 responses: 5392 200: 5393 description: "no error" 5394 schema: 5395 type: "string" 5396 format: "binary" 5397 500: 5398 description: "server error" 5399 schema: 5400 $ref: "#/definitions/ErrorResponse" 5401 parameters: 5402 - name: "names" 5403 in: "query" 5404 description: "Image names to filter by" 5405 type: "array" 5406 items: 5407 type: "string" 5408 tags: 5409 - "Image" 5410 /images/load: 5411 post: 5412 summary: "Import images" 5413 description: | 5414 Load a set of images and tags into a repository. 5415 5416 For details on the format, see [the export image endpoint](#operation/GetImage). 5417 operationId: "PostImageLoad" 5418 consumes: 5419 - "application/x-tar" 5420 produces: 5421 - "application/json" 5422 responses: 5423 200: 5424 description: "no error" 5425 500: 5426 description: "server error" 5427 schema: 5428 $ref: "#/definitions/ErrorResponse" 5429 parameters: 5430 - name: "imagesTarball" 5431 in: "body" 5432 description: "Tar archive containing images" 5433 schema: 5434 type: "string" 5435 format: "binary" 5436 - name: "quiet" 5437 in: "query" 5438 description: "Suppress progress details during load." 5439 type: "boolean" 5440 default: false 5441 tags: 5442 - "Image" 5443 /containers/{id}/exec: 5444 post: 5445 summary: "Create an exec instance" 5446 description: "Run a command inside a running container." 5447 operationId: "PostContainerExec" 5448 consumes: 5449 - "application/json" 5450 produces: 5451 - "application/json" 5452 responses: 5453 201: 5454 description: "no error" 5455 schema: 5456 $ref: "#/definitions/IdResponse" 5457 404: 5458 description: "no such container" 5459 schema: 5460 $ref: "#/definitions/ErrorResponse" 5461 examples: 5462 application/json: 5463 message: "No such container: c2ada9df5af8" 5464 409: 5465 description: "container is paused" 5466 schema: 5467 $ref: "#/definitions/ErrorResponse" 5468 500: 5469 description: "Server error" 5470 schema: 5471 $ref: "#/definitions/ErrorResponse" 5472 parameters: 5473 - name: "execConfig" 5474 in: "body" 5475 description: "Exec configuration" 5476 schema: 5477 type: "object" 5478 properties: 5479 AttachStdin: 5480 type: "boolean" 5481 description: "Attach to `stdin` of the exec command." 5482 AttachStdout: 5483 type: "boolean" 5484 description: "Attach to `stdout` of the exec command." 5485 AttachStderr: 5486 type: "boolean" 5487 description: "Attach to `stderr` of the exec command." 5488 DetachKeys: 5489 type: "string" 5490 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 `_`." 5491 Tty: 5492 type: "boolean" 5493 description: "Allocate a pseudo-TTY." 5494 Env: 5495 description: "A list of environment variables in the form `[\"VAR=value\", ...]`." 5496 type: "array" 5497 items: 5498 type: "string" 5499 Cmd: 5500 type: "array" 5501 description: "Command to run, as a string or array of strings." 5502 items: 5503 type: "string" 5504 Privileged: 5505 type: "boolean" 5506 description: "Runs the exec process with extended privileges." 5507 default: false 5508 User: 5509 type: "string" 5510 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`." 5511 example: 5512 AttachStdin: false 5513 AttachStdout: true 5514 AttachStderr: true 5515 DetachKeys: "ctrl-p,ctrl-q" 5516 Tty: false 5517 Cmd: 5518 - "date" 5519 Env: 5520 - "FOO=bar" 5521 - "BAZ=quux" 5522 required: true 5523 - name: "id" 5524 in: "path" 5525 description: "ID or name of container" 5526 type: "string" 5527 required: true 5528 tags: 5529 - "Exec" 5530 /exec/{id}/start: 5531 post: 5532 summary: "Start an exec instance" 5533 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." 5534 operationId: "PostExecStart" 5535 consumes: 5536 - "application/json" 5537 produces: 5538 - "application/vnd.docker.raw-stream" 5539 responses: 5540 200: 5541 description: "No error" 5542 404: 5543 description: "No such exec instance" 5544 schema: 5545 $ref: "#/definitions/ErrorResponse" 5546 409: 5547 description: "Container is stopped or paused" 5548 schema: 5549 $ref: "#/definitions/ErrorResponse" 5550 parameters: 5551 - name: "execStartConfig" 5552 in: "body" 5553 schema: 5554 type: "object" 5555 properties: 5556 Detach: 5557 type: "boolean" 5558 description: "Detach from the command." 5559 Tty: 5560 type: "boolean" 5561 description: "Allocate a pseudo-TTY." 5562 example: 5563 Detach: false 5564 Tty: false 5565 - name: "id" 5566 in: "path" 5567 description: "Exec instance ID" 5568 required: true 5569 type: "string" 5570 tags: 5571 - "Exec" 5572 /exec/{id}/resize: 5573 post: 5574 summary: "Resize an exec instance" 5575 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." 5576 operationId: "PostExecResize" 5577 responses: 5578 201: 5579 description: "No error" 5580 404: 5581 description: "No such exec instance" 5582 schema: 5583 $ref: "#/definitions/ErrorResponse" 5584 parameters: 5585 - name: "id" 5586 in: "path" 5587 description: "Exec instance ID" 5588 required: true 5589 type: "string" 5590 - name: "h" 5591 in: "query" 5592 description: "Height of the TTY session in characters" 5593 type: "integer" 5594 - name: "w" 5595 in: "query" 5596 description: "Width of the TTY session in characters" 5597 type: "integer" 5598 tags: 5599 - "Exec" 5600 /exec/{id}/json: 5601 get: 5602 summary: "Inspect an exec instance" 5603 description: "Return low-level information about an exec instance." 5604 operationId: "PostExecInspect" 5605 produces: 5606 - "application/json" 5607 responses: 5608 200: 5609 description: "No error" 5610 schema: 5611 type: "object" 5612 properties: 5613 ID: 5614 type: "string" 5615 Running: 5616 type: "boolean" 5617 ExitCode: 5618 type: "integer" 5619 ProcessConfig: 5620 $ref: "#/definitions/ProcessConfig" 5621 OpenStdin: 5622 type: "boolean" 5623 OpenStderr: 5624 type: "boolean" 5625 OpenStdout: 5626 type: "boolean" 5627 ContainerID: 5628 type: "string" 5629 Pid: 5630 type: "integer" 5631 description: "The system process ID for the exec process." 5632 examples: 5633 application/json: 5634 CanRemove: false 5635 ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" 5636 DetachKeys: "" 5637 ExitCode: 2 5638 ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" 5639 OpenStderr: true 5640 OpenStdin: true 5641 OpenStdout: true 5642 ProcessConfig: 5643 arguments: 5644 - "-c" 5645 - "exit 2" 5646 entrypoint: "sh" 5647 privileged: false 5648 tty: true 5649 user: "1000" 5650 Running: false 5651 Pid: 42000 5652 404: 5653 description: "No such exec instance" 5654 schema: 5655 $ref: "#/definitions/ErrorResponse" 5656 500: 5657 description: "Server error" 5658 schema: 5659 $ref: "#/definitions/ErrorResponse" 5660 parameters: 5661 - name: "id" 5662 in: "path" 5663 description: "Exec instance ID" 5664 required: true 5665 type: "string" 5666 tags: 5667 - "Exec" 5668 5669 /volumes: 5670 get: 5671 summary: "List volumes" 5672 operationId: "VolumesList" 5673 produces: ["application/json"] 5674 responses: 5675 200: 5676 description: "Summary volume data that matches the query" 5677 schema: 5678 type: "object" 5679 required: [Volumes, Warnings] 5680 properties: 5681 Volumes: 5682 type: "array" 5683 x-nullable: false 5684 description: "List of volumes" 5685 items: 5686 $ref: "#/definitions/Volume" 5687 Warnings: 5688 type: "array" 5689 x-nullable: false 5690 description: "Warnings that occurred when fetching the list of volumes" 5691 items: 5692 type: "string" 5693 5694 examples: 5695 application/json: 5696 Volumes: 5697 - Name: "tardis" 5698 Driver: "local" 5699 Mountpoint: "/var/lib/docker/volumes/tardis" 5700 Labels: 5701 com.example.some-label: "some-value" 5702 com.example.some-other-label: "some-other-value" 5703 Scope: "local" 5704 Options: 5705 device: "tmpfs" 5706 o: "size=100m,uid=1000" 5707 type: "tmpfs" 5708 Warnings: [] 5709 500: 5710 description: "Server error" 5711 schema: 5712 $ref: "#/definitions/ErrorResponse" 5713 parameters: 5714 - name: "filters" 5715 in: "query" 5716 description: | 5717 JSON encoded value of the filters (a `map[string][]string`) to 5718 process on the volumes list. Available filters: 5719 5720 - `name=<volume-name>` Matches all or part of a volume name. 5721 - `dangling=<boolean>` When set to `true` (or `1`), returns all 5722 volumes that are not in use by a container. When set to `false` 5723 (or `0`), only volumes that are in use by one or more 5724 containers are returned. 5725 - `driver=<volume-driver-name>` Matches all or part of a volume 5726 driver name. 5727 type: "string" 5728 format: "json" 5729 tags: ["Volume"] 5730 5731 /volumes/create: 5732 post: 5733 summary: "Create a volume" 5734 operationId: "VolumesCreate" 5735 consumes: ["application/json"] 5736 produces: ["application/json"] 5737 responses: 5738 201: 5739 description: "The volume was created successfully" 5740 schema: 5741 $ref: "#/definitions/Volume" 5742 500: 5743 description: "Server error" 5744 schema: 5745 $ref: "#/definitions/ErrorResponse" 5746 parameters: 5747 - name: "volumeConfig" 5748 in: "body" 5749 required: true 5750 description: "Volume configuration" 5751 schema: 5752 type: "object" 5753 properties: 5754 Name: 5755 description: "The new volume's name. If not specified, Docker generates a name." 5756 type: "string" 5757 x-nullable: false 5758 Driver: 5759 description: "Name of the volume driver to use." 5760 type: "string" 5761 default: "local" 5762 x-nullable: false 5763 DriverOpts: 5764 description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific." 5765 type: "object" 5766 additionalProperties: 5767 type: "string" 5768 Labels: 5769 description: "User-defined key/value metadata." 5770 type: "object" 5771 additionalProperties: 5772 type: "string" 5773 example: 5774 Name: "tardis" 5775 Labels: 5776 com.example.some-label: "some-value" 5777 com.example.some-other-label: "some-other-value" 5778 Driver: "custom" 5779 tags: ["Volume"] 5780 5781 /volumes/{name}: 5782 get: 5783 summary: "Inspect a volume" 5784 operationId: "VolumesInspect" 5785 produces: ["application/json"] 5786 responses: 5787 200: 5788 description: "No error" 5789 schema: 5790 $ref: "#/definitions/Volume" 5791 404: 5792 description: "No such volume" 5793 schema: 5794 $ref: "#/definitions/ErrorResponse" 5795 500: 5796 description: "Server error" 5797 schema: 5798 $ref: "#/definitions/ErrorResponse" 5799 parameters: 5800 - name: "name" 5801 in: "path" 5802 required: true 5803 description: "Volume name or ID" 5804 type: "string" 5805 tags: ["Volume"] 5806 5807 delete: 5808 summary: "Remove a volume" 5809 description: "Instruct the driver to remove the volume." 5810 operationId: "VolumesDelete" 5811 responses: 5812 204: 5813 description: "The volume was removed" 5814 404: 5815 description: "No such volume or volume driver" 5816 schema: 5817 $ref: "#/definitions/ErrorResponse" 5818 409: 5819 description: "Volume is in use and cannot be removed" 5820 schema: 5821 $ref: "#/definitions/ErrorResponse" 5822 500: 5823 description: "Server error" 5824 schema: 5825 $ref: "#/definitions/ErrorResponse" 5826 parameters: 5827 - name: "name" 5828 in: "path" 5829 required: true 5830 description: "Volume name or ID" 5831 type: "string" 5832 - name: "force" 5833 in: "query" 5834 description: "Force the removal of the volume" 5835 type: "boolean" 5836 default: false 5837 tags: ["Volume"] 5838 /volumes/prune: 5839 post: 5840 summary: "Delete unused volumes" 5841 consumes: 5842 - "application/json" 5843 produces: 5844 - "application/json" 5845 operationId: "VolumePrune" 5846 responses: 5847 200: 5848 description: "No error" 5849 schema: 5850 type: "object" 5851 properties: 5852 VolumesDeleted: 5853 description: "Volumes that were deleted" 5854 type: "array" 5855 items: 5856 type: "string" 5857 SpaceReclaimed: 5858 description: "Disk space reclaimed in bytes" 5859 type: "integer" 5860 format: "int64" 5861 500: 5862 description: "Server error" 5863 schema: 5864 $ref: "#/definitions/ErrorResponse" 5865 tags: 5866 - "Volume" 5867 /networks: 5868 get: 5869 summary: "List networks" 5870 operationId: "NetworksList" 5871 produces: 5872 - "application/json" 5873 responses: 5874 200: 5875 description: "No error" 5876 schema: 5877 type: "array" 5878 items: 5879 $ref: "#/definitions/Network" 5880 examples: 5881 application/json: 5882 - Name: "bridge" 5883 Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" 5884 Created: "2016-10-19T06:21:00.416543526Z" 5885 Scope: "local" 5886 Driver: "bridge" 5887 EnableIPv6: false 5888 Internal: false 5889 IPAM: 5890 Driver: "default" 5891 Config: 5892 - 5893 Subnet: "172.17.0.0/16" 5894 Containers: 5895 39b69226f9d79f5634485fb236a23b2fe4e96a0a94128390a7fbbcc167065867: 5896 EndpointID: "ed2419a97c1d9954d05b46e462e7002ea552f216e9b136b80a7db8d98b442eda" 5897 MacAddress: "02:42:ac:11:00:02" 5898 IPv4Address: "172.17.0.2/16" 5899 IPv6Address: "" 5900 Options: 5901 com.docker.network.bridge.default_bridge: "true" 5902 com.docker.network.bridge.enable_icc: "true" 5903 com.docker.network.bridge.enable_ip_masquerade: "true" 5904 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 5905 com.docker.network.bridge.name: "docker0" 5906 com.docker.network.driver.mtu: "1500" 5907 - Name: "none" 5908 Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" 5909 Created: "0001-01-01T00:00:00Z" 5910 Scope: "local" 5911 Driver: "null" 5912 EnableIPv6: false 5913 Internal: false 5914 IPAM: 5915 Driver: "default" 5916 Config: [] 5917 Containers: {} 5918 Options: {} 5919 - Name: "host" 5920 Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" 5921 Created: "0001-01-01T00:00:00Z" 5922 Scope: "local" 5923 Driver: "host" 5924 EnableIPv6: false 5925 Internal: false 5926 IPAM: 5927 Driver: "default" 5928 Config: [] 5929 Containers: {} 5930 Options: {} 5931 500: 5932 description: "Server error" 5933 schema: 5934 $ref: "#/definitions/ErrorResponse" 5935 parameters: 5936 - name: "filters" 5937 in: "query" 5938 description: | 5939 JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: 5940 5941 - `driver=<driver-name>` Matches a network's driver. 5942 - `id=<network-id>` Matches all or part of a network ID. 5943 - `label=<key>` or `label=<key>=<value>` of a network label. 5944 - `name=<network-name>` Matches all or part of a network name. 5945 - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. 5946 type: "string" 5947 tags: ["Network"] 5948 5949 /networks/{id}: 5950 get: 5951 summary: "Inspect a network" 5952 operationId: "NetworksInspect" 5953 produces: 5954 - "application/json" 5955 responses: 5956 200: 5957 description: "No error" 5958 schema: 5959 $ref: "#/definitions/Network" 5960 404: 5961 description: "Network not found" 5962 schema: 5963 $ref: "#/definitions/ErrorResponse" 5964 parameters: 5965 - name: "id" 5966 in: "path" 5967 description: "Network ID or name" 5968 required: true 5969 type: "string" 5970 tags: ["Network"] 5971 5972 delete: 5973 summary: "Remove a network" 5974 operationId: "DeleteNetworks" 5975 responses: 5976 204: 5977 description: "No error" 5978 404: 5979 description: "no such network" 5980 schema: 5981 $ref: "#/definitions/ErrorResponse" 5982 500: 5983 description: "Server error" 5984 schema: 5985 $ref: "#/definitions/ErrorResponse" 5986 parameters: 5987 - name: "id" 5988 in: "path" 5989 description: "Network ID or name" 5990 required: true 5991 type: "string" 5992 tags: ["Network"] 5993 5994 /networks/create: 5995 post: 5996 summary: "Create a network" 5997 operationId: "NetworksCreate" 5998 consumes: 5999 - "application/json" 6000 produces: 6001 - "application/json" 6002 responses: 6003 201: 6004 description: "No error" 6005 schema: 6006 type: "object" 6007 properties: 6008 Id: 6009 description: "The ID of the created network." 6010 type: "string" 6011 Warning: 6012 type: "string" 6013 example: 6014 Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" 6015 Warning: "" 6016 404: 6017 description: "plugin not found" 6018 schema: 6019 $ref: "#/definitions/ErrorResponse" 6020 500: 6021 description: "Server error" 6022 schema: 6023 $ref: "#/definitions/ErrorResponse" 6024 parameters: 6025 - name: "networkConfig" 6026 in: "body" 6027 description: "Network configuration" 6028 required: true 6029 schema: 6030 type: "object" 6031 required: ["Name"] 6032 properties: 6033 Name: 6034 description: "The network's name." 6035 type: "string" 6036 CheckDuplicate: 6037 description: "Check for networks with duplicate names." 6038 type: "boolean" 6039 Driver: 6040 description: "Name of the network driver plugin to use." 6041 type: "string" 6042 default: "bridge" 6043 Internal: 6044 description: "Restrict external access to the network." 6045 type: "boolean" 6046 IPAM: 6047 description: "Optional custom IP scheme for the network." 6048 $ref: "#/definitions/IPAM" 6049 EnableIPv6: 6050 description: "Enable IPv6 on the network." 6051 type: "boolean" 6052 Options: 6053 description: "Network specific options to be used by the drivers." 6054 type: "object" 6055 additionalProperties: 6056 type: "string" 6057 Labels: 6058 description: "User-defined key/value metadata." 6059 type: "object" 6060 additionalProperties: 6061 type: "string" 6062 example: 6063 Name: "isolated_nw" 6064 CheckDuplicate: false 6065 Driver: "bridge" 6066 EnableIPv6: true 6067 IPAM: 6068 Driver: "default" 6069 Config: 6070 - Subnet: "172.20.0.0/16" 6071 IPRange: "172.20.10.0/24" 6072 Gateway: "172.20.10.11" 6073 - Subnet: "2001:db8:abcd::/64" 6074 Gateway: "2001:db8:abcd::1011" 6075 Options: 6076 foo: "bar" 6077 Internal: true 6078 Options: 6079 com.docker.network.bridge.default_bridge: "true" 6080 com.docker.network.bridge.enable_icc: "true" 6081 com.docker.network.bridge.enable_ip_masquerade: "true" 6082 com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" 6083 com.docker.network.bridge.name: "docker0" 6084 com.docker.network.driver.mtu: "1500" 6085 Labels: 6086 com.example.some-label: "some-value" 6087 com.example.some-other-label: "some-other-value" 6088 tags: ["Network"] 6089 6090 /networks/{id}/connect: 6091 post: 6092 summary: "Connect a container to a network" 6093 operationId: "NetworksConnect" 6094 consumes: 6095 - "application/octet-stream" 6096 responses: 6097 200: 6098 description: "No error" 6099 403: 6100 description: "Operation not supported for swarm scoped networks" 6101 schema: 6102 $ref: "#/definitions/ErrorResponse" 6103 404: 6104 description: "Network or container not found" 6105 schema: 6106 $ref: "#/definitions/ErrorResponse" 6107 500: 6108 description: "Server error" 6109 schema: 6110 $ref: "#/definitions/ErrorResponse" 6111 parameters: 6112 - name: "id" 6113 in: "path" 6114 description: "Network ID or name" 6115 required: true 6116 type: "string" 6117 - name: "container" 6118 in: "body" 6119 required: true 6120 schema: 6121 type: "object" 6122 properties: 6123 Container: 6124 type: "string" 6125 description: "The ID or name of the container to connect to the network." 6126 EndpointConfig: 6127 $ref: "#/definitions/EndpointSettings" 6128 example: 6129 Container: "3613f73ba0e4" 6130 EndpointConfig: 6131 IPAMConfig: 6132 IPv4Address: "172.24.56.89" 6133 IPv6Address: "2001:db8::5689" 6134 tags: ["Network"] 6135 6136 /networks/{id}/disconnect: 6137 post: 6138 summary: "Disconnect a container from a network" 6139 operationId: "NetworksDisconnect" 6140 consumes: 6141 - "application/json" 6142 responses: 6143 200: 6144 description: "No error" 6145 403: 6146 description: "Operation not supported for swarm scoped networks" 6147 schema: 6148 $ref: "#/definitions/ErrorResponse" 6149 404: 6150 description: "Network or container not found" 6151 schema: 6152 $ref: "#/definitions/ErrorResponse" 6153 500: 6154 description: "Server error" 6155 schema: 6156 $ref: "#/definitions/ErrorResponse" 6157 parameters: 6158 - name: "id" 6159 in: "path" 6160 description: "Network ID or name" 6161 required: true 6162 type: "string" 6163 - name: "container" 6164 in: "body" 6165 required: true 6166 schema: 6167 type: "object" 6168 properties: 6169 Container: 6170 type: "string" 6171 description: "The ID or name of the container to disconnect from the network." 6172 Force: 6173 type: "boolean" 6174 description: "Force the container to disconnect from the network." 6175 tags: ["Network"] 6176 /networks/prune: 6177 post: 6178 summary: "Delete unused networks" 6179 consumes: 6180 - "application/json" 6181 produces: 6182 - "application/json" 6183 operationId: "NetworkPrune" 6184 responses: 6185 200: 6186 description: "No error" 6187 schema: 6188 type: "object" 6189 properties: 6190 VolumesDeleted: 6191 description: "Networks that were deleted" 6192 type: "array" 6193 items: 6194 type: "string" 6195 500: 6196 description: "Server error" 6197 schema: 6198 $ref: "#/definitions/ErrorResponse" 6199 tags: 6200 - "Network" 6201 /plugins: 6202 get: 6203 summary: "List plugins" 6204 operationId: "PluginsList" 6205 description: "Returns information about installed plugins." 6206 produces: ["application/json"] 6207 responses: 6208 200: 6209 description: "No error" 6210 schema: 6211 type: "array" 6212 items: 6213 $ref: "#/definitions/Plugin" 6214 example: 6215 - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" 6216 Name: "tiborvass/no-remove" 6217 Tag: "latest" 6218 Active: true 6219 Config: 6220 Mounts: 6221 - Name: "" 6222 Description: "" 6223 Settable: null 6224 Source: "/data" 6225 Destination: "/data" 6226 Type: "bind" 6227 Options: 6228 - "shared" 6229 - "rbind" 6230 - Name: "" 6231 Description: "" 6232 Settable: null 6233 Source: null 6234 Destination: "/foobar" 6235 Type: "tmpfs" 6236 Options: null 6237 Env: 6238 - "DEBUG=1" 6239 Args: null 6240 Devices: null 6241 Manifest: 6242 ManifestVersion: "v0" 6243 Description: "A test plugin for Docker" 6244 Documentation: "https://docs.docker.com/engine/extend/plugins/" 6245 Interface: 6246 Types: 6247 - "docker.volumedriver/1.0" 6248 Socket: "plugins.sock" 6249 Entrypoint: 6250 - "plugin-no-remove" 6251 - "/data" 6252 Workdir: "" 6253 User: {} 6254 Network: 6255 Type: "host" 6256 Capabilities: null 6257 Mounts: 6258 - Name: "" 6259 Description: "" 6260 Settable: null 6261 Source: "/data" 6262 Destination: "/data" 6263 Type: "bind" 6264 Options: 6265 - "shared" 6266 - "rbind" 6267 - Name: "" 6268 Description: "" 6269 Settable: null 6270 Source: null 6271 Destination: "/foobar" 6272 Type: "tmpfs" 6273 Options: null 6274 Devices: 6275 - Name: "device" 6276 Description: "a host device to mount" 6277 Settable: null 6278 Path: "/dev/cpu_dma_latency" 6279 Env: 6280 - Name: "DEBUG" 6281 Description: "If set, prints debug messages" 6282 Settable: null 6283 Value: "1" 6284 Args: 6285 Name: "args" 6286 Description: "command line arguments" 6287 Settable: null 6288 Value: [] 6289 500: 6290 description: "Server error" 6291 schema: 6292 $ref: "#/definitions/ErrorResponse" 6293 tags: ["Plugins"] 6294 6295 /plugins/pull: 6296 post: 6297 summary: "Install a plugin" 6298 operationId: "PostPluginsPull" 6299 description: | 6300 Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginEnable). 6301 produces: 6302 - "application/json" 6303 responses: 6304 200: 6305 description: "no error" 6306 schema: 6307 type: "array" 6308 items: 6309 description: "Describes a permission the user has to accept upon installing the plugin." 6310 type: "object" 6311 properties: 6312 Name: 6313 type: "string" 6314 Description: 6315 type: "string" 6316 Value: 6317 type: "array" 6318 items: 6319 type: "string" 6320 example: 6321 - Name: "network" 6322 Description: "" 6323 Value: 6324 - "host" 6325 - Name: "mount" 6326 Description: "" 6327 Value: 6328 - "/data" 6329 - Name: "device" 6330 Description: "" 6331 Value: 6332 - "/dev/cpu_dma_latency" 6333 500: 6334 description: "server error" 6335 schema: 6336 $ref: "#/definitions/ErrorResponse" 6337 parameters: 6338 - name: "name" 6339 in: "query" 6340 description: | 6341 The plugin to install. 6342 6343 The `:latest` tag is optional, and is used as the default if omitted. 6344 required: true 6345 type: "string" 6346 - name: "X-Registry-Auth" 6347 in: "header" 6348 description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)" 6349 type: "string" 6350 tags: 6351 - "Plugins" 6352 /plugins/{name}: 6353 get: 6354 summary: "Inspect a plugin" 6355 operationId: "GetPluginsInspect" 6356 responses: 6357 200: 6358 description: "no error" 6359 schema: 6360 $ref: "#/definitions/Plugin" 6361 404: 6362 description: "plugin is not installed" 6363 schema: 6364 $ref: "#/definitions/ErrorResponse" 6365 500: 6366 description: "server error" 6367 schema: 6368 $ref: "#/definitions/ErrorResponse" 6369 parameters: 6370 - name: "name" 6371 in: "path" 6372 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6373 required: true 6374 type: "string" 6375 tags: 6376 - "Plugins" 6377 delete: 6378 summary: "Remove a plugin" 6379 operationId: "DeletePlugins" 6380 responses: 6381 200: 6382 description: "no error" 6383 schema: 6384 $ref: "#/definitions/Plugin" 6385 404: 6386 description: "plugin is not installed" 6387 schema: 6388 $ref: "#/definitions/ErrorResponse" 6389 500: 6390 description: "server error" 6391 schema: 6392 $ref: "#/definitions/ErrorResponse" 6393 parameters: 6394 - name: "name" 6395 in: "path" 6396 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6397 required: true 6398 type: "string" 6399 - name: "force" 6400 in: "query" 6401 description: "Disable the plugin before removing. This may result in issues if the plugin is in use by a container." 6402 type: "boolean" 6403 default: false 6404 tags: 6405 - "Plugins" 6406 /plugins/{name}/enable: 6407 post: 6408 summary: "Enable a plugin" 6409 operationId: "PostPluginsEnable" 6410 responses: 6411 200: 6412 description: "no error" 6413 500: 6414 description: "server error" 6415 schema: 6416 $ref: "#/definitions/ErrorResponse" 6417 parameters: 6418 - name: "name" 6419 in: "path" 6420 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6421 required: true 6422 type: "string" 6423 tags: 6424 - "Plugins" 6425 /plugins/{name}/disable: 6426 post: 6427 summary: "Disable a plugin" 6428 operationId: "PostPluginsDisable" 6429 responses: 6430 200: 6431 description: "no error" 6432 500: 6433 description: "server error" 6434 schema: 6435 $ref: "#/definitions/ErrorResponse" 6436 parameters: 6437 - name: "name" 6438 in: "path" 6439 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6440 required: true 6441 type: "string" 6442 tags: 6443 - "Plugins" 6444 /plugins/create: 6445 post: 6446 summary: "Create a plugin" 6447 operationId: "PostPluginsCreate" 6448 consumes: 6449 - "application/x-tar" 6450 responses: 6451 204: 6452 description: "no error" 6453 500: 6454 description: "server error" 6455 schema: 6456 $ref: "#/definitions/ErrorResponse" 6457 parameters: 6458 - name: "name" 6459 in: "query" 6460 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6461 required: true 6462 type: "string" 6463 - name: "tarContext" 6464 in: "body" 6465 description: "Path to tar containing plugin rootfs and manifest" 6466 schema: 6467 type: "string" 6468 format: "binary" 6469 tags: 6470 - "Plugins" 6471 /plugins/{name}/set: 6472 post: 6473 summary: "Configure a plugin" 6474 operationId: "PostPluginsSet" 6475 consumes: 6476 - "application/json" 6477 parameters: 6478 - name: "name" 6479 in: "path" 6480 description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." 6481 required: true 6482 type: "string" 6483 - name: "body" 6484 in: "body" 6485 schema: 6486 type: "array" 6487 items: 6488 type: "string" 6489 example: ["DEBUG=1"] 6490 responses: 6491 204: 6492 description: "No error" 6493 404: 6494 description: "Plugin not installed" 6495 schema: 6496 $ref: "#/definitions/ErrorResponse" 6497 500: 6498 description: "Server error" 6499 schema: 6500 $ref: "#/definitions/ErrorResponse" 6501 tags: 6502 - "Plugins" 6503 /nodes: 6504 get: 6505 summary: "List nodes" 6506 operationId: "GetNodesList" 6507 responses: 6508 200: 6509 description: "no error" 6510 schema: 6511 type: "array" 6512 items: 6513 $ref: "#/definitions/Node" 6514 500: 6515 description: "server error" 6516 schema: 6517 $ref: "#/definitions/ErrorResponse" 6518 parameters: 6519 - name: "filters" 6520 in: "query" 6521 description: | 6522 Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). 6523 6524 Available filters: 6525 - `id=<node id>` 6526 - `name=<node name>` 6527 - `membership=`(`pending`|`accepted`|`rejected`)` 6528 - `role=`(`worker`|`manager`)` 6529 type: "string" 6530 tags: 6531 - "Nodes" 6532 /nodes/{id}: 6533 get: 6534 summary: "Inspect a node" 6535 operationId: "GetNodesInspect" 6536 responses: 6537 200: 6538 description: "no error" 6539 schema: 6540 $ref: "#/definitions/Node" 6541 404: 6542 description: "no such node" 6543 schema: 6544 $ref: "#/definitions/ErrorResponse" 6545 500: 6546 description: "server error" 6547 schema: 6548 $ref: "#/definitions/ErrorResponse" 6549 parameters: 6550 - name: "id" 6551 in: "path" 6552 description: "The ID of the node" 6553 type: "string" 6554 required: true 6555 tags: 6556 - "Nodes" 6557 delete: 6558 summary: "Delete a node" 6559 operationId: "DeleteNodes" 6560 responses: 6561 200: 6562 description: "no error" 6563 404: 6564 description: "no such node" 6565 schema: 6566 $ref: "#/definitions/ErrorResponse" 6567 500: 6568 description: "server error" 6569 schema: 6570 $ref: "#/definitions/ErrorResponse" 6571 parameters: 6572 - name: "id" 6573 in: "path" 6574 description: "The ID of the node" 6575 type: "string" 6576 required: true 6577 - name: "force" 6578 in: "query" 6579 description: "Force remove a node from the swarm" 6580 default: false 6581 type: "boolean" 6582 tags: 6583 - "Nodes" 6584 /nodes/{id}/update: 6585 post: 6586 summary: "Update a node" 6587 operationId: "PostNodesUpdate" 6588 responses: 6589 200: 6590 description: "no error" 6591 404: 6592 description: "no such node" 6593 schema: 6594 $ref: "#/definitions/ErrorResponse" 6595 500: 6596 description: "server error" 6597 schema: 6598 $ref: "#/definitions/ErrorResponse" 6599 parameters: 6600 - name: "id" 6601 in: "path" 6602 description: "The ID of the node" 6603 type: "string" 6604 required: true 6605 - name: "body" 6606 in: "body" 6607 schema: 6608 $ref: "#/definitions/NodeSpec" 6609 - name: "version" 6610 in: "query" 6611 description: "The version number of the node object being updated. This is required to avoid conflicting writes." 6612 type: "integer" 6613 format: "int64" 6614 required: true 6615 tags: 6616 - "Nodes" 6617 /swarm: 6618 get: 6619 summary: "Inspect swarm" 6620 operationId: "GetSwarmInspect" 6621 responses: 6622 200: 6623 description: "no error" 6624 schema: 6625 allOf: 6626 - $ref: "#/definitions/ClusterInfo" 6627 - type: "object" 6628 properties: 6629 JoinTokens: 6630 description: "The tokens workers and managers need to join the swarm." 6631 type: "object" 6632 properties: 6633 Worker: 6634 description: "The token workers can use to join the swarm." 6635 type: "string" 6636 Manager: 6637 description: "The token managers can use to join the swarm." 6638 type: "string" 6639 example: 6640 CreatedAt: "2016-08-15T16:00:20.349727406Z" 6641 Spec: 6642 Dispatcher: 6643 HeartbeatPeriod: 5000000000 6644 Orchestration: 6645 TaskHistoryRetentionLimit: 10 6646 CAConfig: 6647 NodeCertExpiry: 7776000000000000 6648 Raft: 6649 LogEntriesForSlowFollowers: 500 6650 HeartbeatTick: 1 6651 SnapshotInterval: 10000 6652 ElectionTick: 3 6653 TaskDefaults: {} 6654 Name: "default" 6655 JoinTokens: 6656 Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a" 6657 Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l" 6658 ID: "70ilmkj2f6sp2137c753w2nmt" 6659 UpdatedAt: "2016-08-15T16:32:09.623207604Z" 6660 Version: 6661 Index: 51 6662 500: 6663 description: "server error" 6664 schema: 6665 $ref: "#/definitions/ErrorResponse" 6666 tags: 6667 - "Swarm" 6668 /swarm/init: 6669 post: 6670 summary: "Initialize a new swarm" 6671 operationId: "PostSwarmInit" 6672 produces: 6673 - "application/json" 6674 - "text/plain" 6675 responses: 6676 200: 6677 description: "no error" 6678 schema: 6679 description: "The node ID" 6680 type: "string" 6681 example: "7v2t30z9blmxuhnyo6s4cpenp" 6682 400: 6683 description: "bad parameter" 6684 schema: 6685 $ref: "#/definitions/ErrorResponse" 6686 406: 6687 description: "node is already part of a swarm" 6688 schema: 6689 $ref: "#/definitions/ErrorResponse" 6690 500: 6691 description: "server error" 6692 schema: 6693 $ref: "#/definitions/ErrorResponse" 6694 parameters: 6695 - name: "body" 6696 in: "body" 6697 required: true 6698 schema: 6699 type: "object" 6700 properties: 6701 ListenAddr: 6702 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." 6703 type: "string" 6704 AdvertiseAddr: 6705 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." 6706 type: "string" 6707 ForceNewCluster: 6708 description: "Force creation of a new swarm." 6709 type: "boolean" 6710 Spec: 6711 $ref: "#/definitions/SwarmSpec" 6712 example: 6713 ListenAddr: "0.0.0.0:2377" 6714 AdvertiseAddr: "192.168.1.1:2377" 6715 ForceNewCluster: false 6716 Spec: 6717 Orchestration: {} 6718 Raft: {} 6719 Dispatcher: {} 6720 CAConfig: {} 6721 tags: 6722 - "Swarm" 6723 /swarm/join: 6724 post: 6725 summary: "Join an existing swarm" 6726 operationId: "PostSwarmJoin" 6727 responses: 6728 200: 6729 description: "no error" 6730 400: 6731 description: "bad parameter" 6732 schema: 6733 $ref: "#/definitions/ErrorResponse" 6734 406: 6735 description: "node is already part of a swarm" 6736 schema: 6737 $ref: "#/definitions/ErrorResponse" 6738 500: 6739 description: "server error" 6740 schema: 6741 $ref: "#/definitions/ErrorResponse" 6742 parameters: 6743 - name: "body" 6744 in: "body" 6745 required: true 6746 schema: 6747 type: "object" 6748 properties: 6749 ListenAddr: 6750 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)." 6751 type: "string" 6752 AdvertiseAddr: 6753 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." 6754 type: "string" 6755 RemoteAddrs: 6756 description: "Addresses of manager nodes already participating in the swarm." 6757 type: "string" 6758 JoinToken: 6759 description: "Secret token for joining this swarm." 6760 type: "string" 6761 example: 6762 ListenAddr: "0.0.0.0:2377" 6763 AdvertiseAddr: "192.168.1.1:2377" 6764 RemoteAddrs: 6765 - "node1:2377" 6766 JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" 6767 tags: 6768 - "Swarm" 6769 /swarm/leave: 6770 post: 6771 summary: "Leave a swarm" 6772 operationId: "PostSwarmLeave" 6773 responses: 6774 200: 6775 description: "no error" 6776 406: 6777 description: "node is not part of a swarm" 6778 schema: 6779 $ref: "#/definitions/ErrorResponse" 6780 500: 6781 description: "server error" 6782 schema: 6783 $ref: "#/definitions/ErrorResponse" 6784 parameters: 6785 - name: "force" 6786 description: "Force leave swarm, even if this is the last manager or that it will break the cluster." 6787 in: "query" 6788 type: "boolean" 6789 default: false 6790 tags: 6791 - "Swarm" 6792 /swarm/update: 6793 post: 6794 summary: "Update a swarm" 6795 operationId: "PostSwarmUpdate" 6796 responses: 6797 200: 6798 description: "no error" 6799 400: 6800 description: "bad parameter" 6801 schema: 6802 $ref: "#/definitions/ErrorResponse" 6803 406: 6804 description: "node is not part of a swarm" 6805 schema: 6806 $ref: "#/definitions/ErrorResponse" 6807 500: 6808 description: "server error" 6809 schema: 6810 $ref: "#/definitions/ErrorResponse" 6811 parameters: 6812 - name: "body" 6813 in: "body" 6814 required: true 6815 schema: 6816 $ref: "#/definitions/SwarmSpec" 6817 - name: "version" 6818 in: "query" 6819 description: "The version number of the swarm object being updated. This is required to avoid conflicting writes." 6820 type: "integer" 6821 format: "int64" 6822 required: true 6823 - name: "rotateWorkerToken" 6824 in: "query" 6825 description: "Rotate the worker join token." 6826 type: "boolean" 6827 default: false 6828 - name: "rotateManagerToken" 6829 in: "query" 6830 description: "Rotate the manager join token." 6831 type: "boolean" 6832 default: false 6833 tags: 6834 - "Swarm" 6835 /services: 6836 get: 6837 summary: "List services" 6838 operationId: "GetServicesList" 6839 responses: 6840 200: 6841 description: "no error" 6842 schema: 6843 type: "array" 6844 items: 6845 $ref: "#/definitions/Service" 6846 500: 6847 description: "server error" 6848 schema: 6849 $ref: "#/definitions/ErrorResponse" 6850 parameters: 6851 - name: "filters" 6852 in: "query" 6853 type: "string" 6854 description: | 6855 A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: 6856 6857 - `id=<node id>` 6858 - `name=<node name>` 6859 tags: 6860 - "Services" 6861 /services/create: 6862 post: 6863 summary: "Create a service" 6864 operationId: "PostServicesCreate" 6865 consumes: 6866 - "application/json" 6867 produces: 6868 - "application/json" 6869 responses: 6870 201: 6871 description: "no error" 6872 schema: 6873 type: "object" 6874 properties: 6875 ID: 6876 description: "The ID of the created service." 6877 type: "string" 6878 example: 6879 ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" 6880 406: 6881 description: "server error or node is not part of a swarm" 6882 schema: 6883 $ref: "#/definitions/ErrorResponse" 6884 409: 6885 description: "name conflicts with an existing service" 6886 schema: 6887 $ref: "#/definitions/ErrorResponse" 6888 500: 6889 description: "server error" 6890 schema: 6891 $ref: "#/definitions/ErrorResponse" 6892 parameters: 6893 - name: "body" 6894 in: "body" 6895 required: true 6896 schema: 6897 allOf: 6898 - $ref: "#/definitions/ServiceSpec" 6899 - type: "object" 6900 example: 6901 Name: "web" 6902 TaskTemplate: 6903 ContainerSpec: 6904 Image: "nginx:alpine" 6905 Mounts: 6906 - 6907 ReadOnly: true 6908 Source: "web-data" 6909 Target: "/usr/share/nginx/html" 6910 Type: "volume" 6911 VolumeOptions: 6912 DriverConfig: {} 6913 Labels: 6914 com.example.something: "something-value" 6915 User: "33" 6916 LogDriver: 6917 Name: "json-file" 6918 Options: 6919 max-file: "3" 6920 max-size: "10M" 6921 Placement: {} 6922 Resources: 6923 Limits: 6924 MemoryBytes: 104857600 6925 Reservations: {} 6926 RestartPolicy: 6927 Condition: "on-failure" 6928 Delay: 10000000000 6929 MaxAttempts: 10 6930 Mode: 6931 Replicated: 6932 Replicas: 4 6933 UpdateConfig: 6934 Delay: 30000000000 6935 Parallelism: 2 6936 FailureAction: "pause" 6937 EndpointSpec: 6938 Ports: 6939 - 6940 Protocol: "tcp" 6941 PublishedPort: 8080 6942 TargetPort: 80 6943 Labels: 6944 foo: "bar" 6945 - name: "X-Registry-Auth" 6946 in: "header" 6947 description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" 6948 type: "string" 6949 tags: 6950 - "Services" 6951 /services/{id}: 6952 get: 6953 summary: "Inspect a service" 6954 operationId: "GetServicesInspect" 6955 responses: 6956 200: 6957 description: "no error" 6958 schema: 6959 $ref: "#/definitions/Service" 6960 404: 6961 description: "no such service" 6962 schema: 6963 $ref: "#/definitions/ErrorResponse" 6964 500: 6965 description: "server error" 6966 schema: 6967 $ref: "#/definitions/ErrorResponse" 6968 parameters: 6969 - name: "id" 6970 in: "path" 6971 description: "ID or name of service." 6972 required: true 6973 type: "string" 6974 tags: 6975 - "Services" 6976 delete: 6977 summary: "Delete a service" 6978 operationId: "DeleteServices" 6979 responses: 6980 200: 6981 description: "no error" 6982 404: 6983 description: "no such service" 6984 schema: 6985 $ref: "#/definitions/ErrorResponse" 6986 500: 6987 description: "server error" 6988 schema: 6989 $ref: "#/definitions/ErrorResponse" 6990 parameters: 6991 - name: "id" 6992 in: "path" 6993 description: "ID or name of service." 6994 required: true 6995 type: "string" 6996 tags: 6997 - "Services" 6998 /services/{id}/update: 6999 post: 7000 summary: "Update a service" 7001 operationId: "PostServicesUpdate" 7002 responses: 7003 200: 7004 description: "no error" 7005 404: 7006 description: "no such service" 7007 schema: 7008 $ref: "#/definitions/ErrorResponse" 7009 500: 7010 description: "server error" 7011 schema: 7012 $ref: "#/definitions/ErrorResponse" 7013 parameters: 7014 - name: "id" 7015 in: "path" 7016 description: "ID or name of service." 7017 required: true 7018 type: "string" 7019 - name: "body" 7020 in: "body" 7021 required: true 7022 schema: 7023 allOf: 7024 - $ref: "#/definitions/ServiceSpec" 7025 - type: "object" 7026 example: 7027 Name: "top" 7028 TaskTemplate: 7029 ContainerSpec: 7030 Image: "busybox" 7031 Args: 7032 - "top" 7033 Resources: 7034 Limits: {} 7035 Reservations: {} 7036 RestartPolicy: 7037 Condition: "any" 7038 MaxAttempts: 0 7039 Placement: {} 7040 ForceUpdate: 0 7041 Mode: 7042 Replicated: 7043 Replicas: 1 7044 UpdateConfig: 7045 Parallelism: 1 7046 Monitor: 15000000000 7047 MaxFailureRatio: 0.15 7048 EndpointSpec: 7049 Mode: "vip" 7050 7051 - name: "version" 7052 in: "query" 7053 description: "The version number of the service object being updated. This is required to avoid conflicting writes." 7054 required: true 7055 type: "integer" 7056 - name: "registryAuthFrom" 7057 in: "query" 7058 type: "string" 7059 description: "If the X-Registry-Auth header is not specified, this 7060 parameter indicates where to find registry authorization credentials. The 7061 valid values are `spec` and `previous-spec`." 7062 default: "spec" 7063 - name: "X-Registry-Auth" 7064 in: "header" 7065 description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" 7066 type: "string" 7067 7068 tags: 7069 - "Services" 7070 /tasks: 7071 get: 7072 summary: "List tasks" 7073 operationId: "GetTasksList" 7074 produces: 7075 - "application/json" 7076 responses: 7077 200: 7078 description: "no error" 7079 schema: 7080 type: "array" 7081 items: 7082 $ref: "#/definitions/Task" 7083 example: 7084 - ID: "0kzzo1i0y4jz6027t0k7aezc7" 7085 Version: 7086 Index: 71 7087 CreatedAt: "2016-06-07T21:07:31.171892745Z" 7088 UpdatedAt: "2016-06-07T21:07:31.376370513Z" 7089 Spec: 7090 ContainerSpec: 7091 Image: "redis" 7092 Resources: 7093 Limits: {} 7094 Reservations: {} 7095 RestartPolicy: 7096 Condition: "any" 7097 MaxAttempts: 0 7098 Placement: {} 7099 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 7100 Slot: 1 7101 NodeID: "60gvrl6tm78dmak4yl7srz94v" 7102 Status: 7103 Timestamp: "2016-06-07T21:07:31.290032978Z" 7104 State: "running" 7105 Message: "started" 7106 ContainerStatus: 7107 ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" 7108 PID: 677 7109 DesiredState: "running" 7110 NetworksAttachments: 7111 - Network: 7112 ID: "4qvuz4ko70xaltuqbt8956gd1" 7113 Version: 7114 Index: 18 7115 CreatedAt: "2016-06-07T20:31:11.912919752Z" 7116 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 7117 Spec: 7118 Name: "ingress" 7119 Labels: 7120 com.docker.swarm.internal: "true" 7121 DriverConfiguration: {} 7122 IPAMOptions: 7123 Driver: {} 7124 Configs: 7125 - Subnet: "10.255.0.0/16" 7126 Gateway: "10.255.0.1" 7127 DriverState: 7128 Name: "overlay" 7129 Options: 7130 com.docker.network.driver.overlay.vxlanid_list: "256" 7131 IPAMOptions: 7132 Driver: 7133 Name: "default" 7134 Configs: 7135 - Subnet: "10.255.0.0/16" 7136 Gateway: "10.255.0.1" 7137 Addresses: 7138 - "10.255.0.10/16" 7139 - ID: "1yljwbmlr8er2waf8orvqpwms" 7140 Version: 7141 Index: 30 7142 CreatedAt: "2016-06-07T21:07:30.019104782Z" 7143 UpdatedAt: "2016-06-07T21:07:30.231958098Z" 7144 Name: "hopeful_cori" 7145 Spec: 7146 ContainerSpec: 7147 Image: "redis" 7148 Resources: 7149 Limits: {} 7150 Reservations: {} 7151 RestartPolicy: 7152 Condition: "any" 7153 MaxAttempts: 0 7154 Placement: {} 7155 ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" 7156 Slot: 1 7157 NodeID: "60gvrl6tm78dmak4yl7srz94v" 7158 Status: 7159 Timestamp: "2016-06-07T21:07:30.202183143Z" 7160 State: "shutdown" 7161 Message: "shutdown" 7162 ContainerStatus: 7163 ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" 7164 DesiredState: "shutdown" 7165 NetworksAttachments: 7166 - Network: 7167 ID: "4qvuz4ko70xaltuqbt8956gd1" 7168 Version: 7169 Index: 18 7170 CreatedAt: "2016-06-07T20:31:11.912919752Z" 7171 UpdatedAt: "2016-06-07T21:07:29.955277358Z" 7172 Spec: 7173 Name: "ingress" 7174 Labels: 7175 com.docker.swarm.internal: "true" 7176 DriverConfiguration: {} 7177 IPAMOptions: 7178 Driver: {} 7179 Configs: 7180 - Subnet: "10.255.0.0/16" 7181 Gateway: "10.255.0.1" 7182 DriverState: 7183 Name: "overlay" 7184 Options: 7185 com.docker.network.driver.overlay.vxlanid_list: "256" 7186 IPAMOptions: 7187 Driver: 7188 Name: "default" 7189 Configs: 7190 - Subnet: "10.255.0.0/16" 7191 Gateway: "10.255.0.1" 7192 Addresses: 7193 - "10.255.0.5/16" 7194 7195 500: 7196 description: "server error" 7197 schema: 7198 $ref: "#/definitions/ErrorResponse" 7199 parameters: 7200 - name: "filters" 7201 in: "query" 7202 type: "string" 7203 description: | 7204 A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: 7205 7206 - `id=<task id>` 7207 - `name=<task name>` 7208 - `service=<service name>` 7209 - `node=<node id or name>` 7210 - `label=key` or `label="key=value"` 7211 - `desired-state=(running | shutdown | accepted)` 7212 tags: 7213 - "Tasks" 7214 /tasks/{id}: 7215 get: 7216 summary: "Inspect a task" 7217 operationId: "GetTasksInspect" 7218 produces: 7219 - "application/json" 7220 responses: 7221 200: 7222 description: "no error" 7223 schema: 7224 $ref: "#/definitions/Task" 7225 404: 7226 description: "no such task" 7227 schema: 7228 $ref: "#/definitions/ErrorResponse" 7229 500: 7230 description: "server error" 7231 schema: 7232 $ref: "#/definitions/ErrorResponse" 7233 parameters: 7234 - name: "id" 7235 in: "path" 7236 description: "ID of the task" 7237 required: true 7238 type: "string" 7239 tags: 7240 - "Tasks"