From 598ea37b90045d45dcb0ce65ff701f645935fd1c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 27 Jul 2017 22:05:31 +0200 Subject: [PATCH 1/5] Docs: update filter options for docker container ps The `is-task` filter was only documented in the usage section, but this section is not used in the documentation. This patch adds the missing filter, synchronises the man page source, and does some slight rephrasing and reformatting of the filters. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 46064f33f4755ee4550ae1b940c5611666dd83e8) Signed-off-by: Sebastiaan van Stijn --- .../cli/docs/reference/commandline/ps.md | 25 ++++---- components/cli/man/src/container/ls.md | 59 +++++++++++-------- 2 files changed, 46 insertions(+), 38 deletions(-) diff --git a/components/cli/docs/reference/commandline/ps.md b/components/cli/docs/reference/commandline/ps.md index 167e5d73be..596cf75a57 100644 --- a/components/cli/docs/reference/commandline/ps.md +++ b/components/cli/docs/reference/commandline/ps.md @@ -84,18 +84,19 @@ The currently supported filters are: | Filter | Description | |:----------------------|:-------------------------------------------------------------------------------------------------------------------------------------| -| `id` | container's ID | -| `name` | container's name | -| `label` | An arbitrary string representing either a key or a key-value pair | +| `id` | Container's ID | +| `name` | Container's name | +| `label` | An arbitrary string representing either a key or a key-value pair. Expressed as `` or `=` | | `exited` | An integer representing the container's exit code. Only useful with `--all`. | -| `status` | One of `created|restarting|running|removing|paused|exited|dead` | +| `status` | One of `created`, `restarting`, `running`, `removing`, `paused`, `exited`, or `dead` | | `ancestor` | Filters containers which share a given image as an ancestor. Expressed as `[:]`, ``, or `` | | `before` or `since` | Filters containers created before or after a given container ID or name | | `volume` | Filters running containers which have mounted a given volume or bind mount. | | `network` | Filters running containers connected to a given network. | -| `publish` or `expose` | Filters containers which publish or expose a given port. | -| `health` | One of `starting|healthy|unhealthy|none`. Filters containers based on their healthcheck status. | -| `isolation` | Windows daemon only. One of `default|process|hyperv`. | +| `publish` or `expose` | Filters containers which publish or expose a given port. Expressed as `[/]` or `/[]` | +| `health` | Filters containers based on their healthcheck status. One of `starting`, `healthy`, `unhealthy` or `none`. | +| `isolation` | Windows daemon only. One of `default`, `process`, or `hyperv`. | +| `is-task` | Filters containers that are a "task" for a service. Boolean option (`true` or `false`) | #### label @@ -208,11 +209,11 @@ CONTAINER ID IMAGE COMMAND CREATED The `ancestor` filter matches containers based on its image or a descendant of it. The filter supports the following image representation: -- image -- image:tag -- image:tag@digest -- short-id -- full-id +- `image` +- `image:tag` +- `image:tag@digest` +- `short-id` +- `full-id` If you don't specify a `tag`, the `latest` tag is used. For example, to filter for containers that use the latest `ubuntu` image: diff --git a/components/cli/man/src/container/ls.md b/components/cli/man/src/container/ls.md index 5cb63079ec..93a87efcab 100644 --- a/components/cli/man/src/container/ls.md +++ b/components/cli/man/src/container/ls.md @@ -4,39 +4,46 @@ the running containers. ## Filters Filter output based on these conditions: - - exited= an exit code of - - label= or label== - - status=(created|restarting|running|paused|exited|dead) - - name= a container's name - - id= a container's ID - - is-task=(true|false) - containers that are a task (part of a service managed by swarm) + - ancestor=([:tag]||) + containers created from an image or a descendant. - before=(|) + - expose=([/]|/[]) + - exited= an exit code of + - health=(starting|healthy|unhealthy|none) + - id= a container's ID + - isolation=(`default`|`process`|`hyperv`) (Windows daemon only) + - is-task=(true|false) + - label= or label== + - name= a container's name + - network=(|) + - publish=([/]|/[]) - since=(|) - - ancestor=([:tag]||) - containers created from an image or a descendant. - - volume=(|) - - network=(|) - containers connected to the provided network - - health=(starting|healthy|unhealthy|none) - filters containers based on healthcheck status - - publish=([/]|/[]) - filters containers based on published ports - - expose=([/]|/[]) - filters containers based on exposed ports + - status=(created|restarting|removing|running|paused|exited) + - volume=(|) ## Format - Pretty-print containers using a Go template. - Valid placeholders: - .ID - Container ID - .Image - Image ID - .Command - Quoted command - .CreatedAt - Time when the container was created. - .RunningFor - Elapsed time since the container was started. - .Ports - Exposed ports. - .Status - Container status. - .Size - Container disk size. - .Names - Container names. - .Labels - All labels assigned to the container. - .Label - Value of a specific label for this container. For example `{{.Label "com.docker.swarm.cpu"}}` - .Mounts - Names of the volumes mounted in this container. +The formatting option (**--format**) pretty-prints container output +using a Go template. + +Valid placeholders for the Go template are listed below: + - .ID - Container ID. + - .Image - Image ID. + - .Command - Quoted command. + - .CreatedAt - Time when the container was created. + - .RunningFor - Elapsed time since the container was started. + - .Ports - Exposed ports. + - .Status - Container status. + - .Size - Container disk size. + - .Names - Container names. + - .Labels - All labels assigned to the container. + - .Label - Value of a specific label for this container. + For example **'{{.Label "com.docker.swarm.cpu"}}'**. + - .Mounts - Names of the volumes mounted in this container. + - .Networks - Names of the networks attached to this container. # EXAMPLES + ## Display all containers, including non-running $ docker container ls -a From 3402a4fe4f61d67bffa84d2870a5c12899e9dce8 Mon Sep 17 00:00:00 2001 From: zebrilee Date: Sat, 29 Jul 2017 20:44:50 +0200 Subject: [PATCH 2/5] modify foo by container in order to clarify the documentation Signed-off-by: zebrilee (cherry picked from commit 2d5f9d83e76ca6bc33541d539583d73c420eedc6) Signed-off-by: Sebastiaan van Stijn --- components/cli/docs/reference/commandline/cp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/cli/docs/reference/commandline/cp.md b/components/cli/docs/reference/commandline/cp.md index 5cbbee25ae..e422305f54 100644 --- a/components/cli/docs/reference/commandline/cp.md +++ b/components/cli/docs/reference/commandline/cp.md @@ -102,11 +102,11 @@ running `tar` in `docker exec`. Both of the following examples do the same thing in different ways (consider `SRC_PATH` and `DEST_PATH` are directories): ```bash -$ docker exec foo tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | tar Cxf DEST_PATH - +$ docker exec CONTAINER tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | tar Cxf DEST_PATH - ``` ```bash -$ tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | docker exec -i foo tar Cxf DEST_PATH - +$ tar Ccf $(dirname SRC_PATH) - $(basename SRC_PATH) | docker exec -i CONTAINER tar Cxf DEST_PATH - ``` Using `-` as the `SRC_PATH` streams the contents of `STDIN` as a tar archive. From fcf5a9d6893945f13dd19daf74bc0e9347bd4502 Mon Sep 17 00:00:00 2001 From: zebrilee Date: Mon, 31 Jul 2017 23:26:02 +0200 Subject: [PATCH 3/5] update service create and update options in commandline documentation Signed-off-by: zebrilee (cherry picked from commit 5fe09164f53c8592765663de0bcdd345dad1d912) Signed-off-by: Sebastiaan van Stijn --- .../cli/docs/reference/commandline/service_create.md | 6 ++++-- .../cli/docs/reference/commandline/service_update.md | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/components/cli/docs/reference/commandline/service_create.md b/components/cli/docs/reference/commandline/service_create.md index d09a6bf8e6..4547b0a836 100644 --- a/components/cli/docs/reference/commandline/service_create.md +++ b/components/cli/docs/reference/commandline/service_create.md @@ -21,9 +21,10 @@ Usage: docker service create [OPTIONS] IMAGE [COMMAND] [ARG...] Create a new service Options: + --config config Specify configurations to expose to the service --constraint list Placement constraints --container-label list Container labels - --credential-spec Credential spec for managed service account (Windows only) + --credential-spec credential-spec Credential spec for managed service account (Windows only) -d, --detach Exit immediately instead of waiting for the service to converge (default true) --dns list Set custom DNS servers --dns-option list Set DNS options @@ -49,8 +50,9 @@ Options: --mode string Service mode (replicated or global) (default "replicated") --mount mount Attach a filesystem mount to the service --name string Service name - --network list Network attachments + --network network Network attachments --no-healthcheck Disable any container-specified HEALTHCHECK + --no-resolve-image Do not query the registry to resolve image digest and supported platforms --placement-pref pref Add a placement preference -p, --publish port Publish a port as a node port -q, --quiet Suppress progress output diff --git a/components/cli/docs/reference/commandline/service_update.md b/components/cli/docs/reference/commandline/service_update.md index 8f075d2c19..1ab05d5051 100644 --- a/components/cli/docs/reference/commandline/service_update.md +++ b/components/cli/docs/reference/commandline/service_update.md @@ -22,11 +22,13 @@ Update a service Options: --args command Service command args + --config-add config Add or update a config file on a service + --config-rm list Remove a configuration file --constraint-add list Add or update a placement constraint --constraint-rm list Remove a constraint --container-label-add list Add or update a container label --container-label-rm list Remove a container label by its key - --credential-spec Credential spec for managed service account (Windows only) + --credential-spec credential-spec Credential spec for managed service account (Windows only) -d, --detach Exit immediately instead of waiting for the service to converge (default true) --dns-add list Add or update a custom DNS server --dns-option-add list Add or update a DNS option @@ -59,9 +61,10 @@ Options: --log-opt list Logging driver options --mount-add mount Add or update a mount on a service --mount-rm list Remove a mount by its target path - --network-add list Add a network + --network-add network Add a network --network-rm list Remove a network --no-healthcheck Disable any container-specified HEALTHCHECK + --no-resolve-image Do not query the registry to resolve image digest and supported platforms --placement-pref-add pref Add a placement preference --placement-pref-rm pref Remove a placement preference --publish-add port Add or update a published port @@ -80,7 +83,7 @@ Options: --rollback-failure-action string Action on rollback failure ("pause"|"continue") --rollback-max-failure-ratio float Failure rate to tolerate during a rollback --rollback-monitor duration Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h) - --rollback-order string Rollback order ("start-first"|"stop-first") (default "stop-first") + --rollback-order string Rollback order ("start-first"|"stop-first") --rollback-parallelism uint Maximum number of tasks rolled back simultaneously (0 to roll back all at once) --secret-add secret Add or update a secret on a service --secret-rm list Remove a secret From 1451e5e58146053dd1832fdfee8174c3e1d60f61 Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Tue, 1 Aug 2017 15:50:42 -0700 Subject: [PATCH 4/5] Add Infinit plugin Signed-off-by: Misty Stanley-Jones (cherry picked from commit 83e85518761da012965c6b01c8a192e05ad74209) Signed-off-by: Sebastiaan van Stijn --- components/cli/docs/extend/legacy_plugins.md | 75 ++++++++++---------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/components/cli/docs/extend/legacy_plugins.md b/components/cli/docs/extend/legacy_plugins.md index dc77743b86..1c9b1a44a6 100644 --- a/components/cli/docs/extend/legacy_plugins.md +++ b/components/cli/docs/extend/legacy_plugins.md @@ -47,49 +47,50 @@ The sections below provide an inexhaustive overview of available plugins. ### Network plugins -Plugin | Description ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -[Contiv Networking](https://github.com/contiv/netplugin) | An open source network plugin to provide infrastructure and security policies for a multi-tenant micro services deployment, while providing an integration to physical network for non-container workload. Contiv Networking implements the remote driver and IPAM APIs available in Docker 1.9 onwards. -[Kuryr Network Plugin](https://github.com/openstack/kuryr) | A network plugin is developed as part of the OpenStack Kuryr project and implements the Docker networking (libnetwork) remote driver API by utilizing Neutron, the OpenStack networking service. It includes an IPAM driver as well. -[Weave Network Plugin](https://www.weave.works/docs/net/latest/introducing-weave/) | A network plugin that creates a virtual network that connects your Docker containers - across multiple hosts or clouds and enables automatic discovery of applications. Weave networks are resilient, partition tolerant, secure and work in partially connected networks, and other adverse environments - all configured with delightful simplicity. +| Plugin | Description | +|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Contiv Networking](https://github.com/contiv/netplugin) | An open source network plugin to provide infrastructure and security policies for a multi-tenant micro services deployment, while providing an integration to physical network for non-container workload. Contiv Networking implements the remote driver and IPAM APIs available in Docker 1.9 onwards. | +| [Kuryr Network Plugin](https://github.com/openstack/kuryr) | A network plugin is developed as part of the OpenStack Kuryr project and implements the Docker networking (libnetwork) remote driver API by utilizing Neutron, the OpenStack networking service. It includes an IPAM driver as well. | +| [Weave Network Plugin](https://www.weave.works/docs/net/latest/introducing-weave/) | A network plugin that creates a virtual network that connects your Docker containers - across multiple hosts or clouds and enables automatic discovery of applications. Weave networks are resilient, partition tolerant, secure and work in partially connected networks, and other adverse environments - all configured with delightful simplicity. | ### Volume plugins -Plugin | Description ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -[Azure File Storage plugin](https://github.com/Azure/azurefile-dockervolumedriver) | Lets you mount Microsoft [Azure File Storage](https://azure.microsoft.com/blog/azure-file-storage-now-generally-available/) shares to Docker containers as volumes using the SMB 3.0 protocol. [Learn more](https://azure.microsoft.com/blog/persistent-docker-volumes-with-azure-file-storage/). -[BeeGFS Volume Plugin](https://github.com/RedCoolBeans/docker-volume-beegfs) | An open source volume plugin to create persistent volumes in a BeeGFS parallel file system. -[Blockbridge plugin](https://github.com/blockbridge/blockbridge-docker-volume) | A volume plugin that provides access to an extensible set of container-based persistent storage options. It supports single and multi-host Docker environments with features that include tenant isolation, automated provisioning, encryption, secure deletion, snapshots and QoS. -[Contiv Volume Plugin](https://github.com/contiv/volplugin) | An open source volume plugin that provides multi-tenant, persistent, distributed storage with intent based consumption. It has support for Ceph and NFS. -[Convoy plugin](https://github.com/rancher/convoy) | A volume plugin for a variety of storage back-ends including device mapper and NFS. It's a simple standalone executable written in Go and provides the framework to support vendor-specific extensions such as snapshots, backups and restore. -[DigitalOcean Block Storage plugin](https://github.com/omallo/docker-volume-plugin-dostorage) | Integrates DigitalOcean's [block storage solution](https://www.digitalocean.com/products/storage/) into the Docker ecosystem by automatically attaching a given block storage volume to a DigitalOcean droplet and making the contents of the volume available to Docker containers running on that droplet. -[DRBD plugin](https://www.drbd.org/en/supported-projects/docker) | A volume plugin that provides highly available storage replicated by [DRBD](https://www.drbd.org). Data written to the docker volume is replicated in a cluster of DRBD nodes. -[Flocker plugin](https://clusterhq.com/docker-plugin/) | A volume plugin that provides multi-host portable volumes for Docker, enabling you to run databases and other stateful containers and move them around across a cluster of machines. -[Fuxi Volume Plugin](https://github.com/openstack/fuxi) | A volume plugin that is developed as part of the OpenStack Kuryr project and implements the Docker volume plugin API by utilizing Cinder, the OpenStack block storage service. -[gce-docker plugin](https://github.com/mcuadros/gce-docker) | A volume plugin able to attach, format and mount Google Compute [persistent-disks](https://cloud.google.com/compute/docs/disks/persistent-disks). -[GlusterFS plugin](https://github.com/calavera/docker-volume-glusterfs) | A volume plugin that provides multi-host volumes management for Docker using GlusterFS. -[Horcrux Volume Plugin](https://github.com/muthu-r/horcrux) | A volume plugin that allows on-demand, version controlled access to your data. Horcrux is an open-source plugin, written in Go, and supports SCP, [Minio](https://www.minio.io) and Amazon S3. -[HPE 3Par Volume Plugin](https://github.com/hpe-storage/python-hpedockerplugin/) | A volume plugin that supports HPE 3Par and StoreVirtual iSCSI storage arrays. -[IPFS Volume Plugin](http://github.com/vdemeester/docker-volume-ipfs) | An open source volume plugin that allows using an [ipfs](https://ipfs.io/) filesystem as a volume. -[Keywhiz plugin](https://github.com/calavera/docker-volume-keywhiz) | A plugin that provides credentials and secret management using Keywhiz as a central repository. -[Local Persist Plugin](https://github.com/CWSpear/local-persist) | A volume plugin that extends the default `local` driver's functionality by allowing you specify a mountpoint anywhere on the host, which enables the files to *always persist*, even if the volume is removed via `docker volume rm`. -[NetApp Plugin](https://github.com/NetApp/netappdvp) (nDVP) | A volume plugin that provides direct integration with the Docker ecosystem for the NetApp storage portfolio. The nDVP package supports the provisioning and management of storage resources from the storage platform to Docker hosts, with a robust framework for adding additional platforms in the future. -[Netshare plugin](https://github.com/ContainX/docker-volume-netshare) | A volume plugin that provides volume management for NFS 3/4, AWS EFS and CIFS file systems. -[Nimble Storage Volume Plugin](https://connect.nimblestorage.com/community/app-integration/docker)| A volume plug-in that integrates with Nimble Storage Unified Flash Fabric arrays. The plug-in abstracts array volume capabilities to the Docker administrator to allow self-provisioning of secure multi-tenant volumes and clones. -[OpenStorage Plugin](https://github.com/libopenstorage/openstorage) | A cluster-aware volume plugin that provides volume management for file and block storage solutions. It implements a vendor neutral specification for implementing extensions such as CoS, encryption, and snapshots. It has example drivers based on FUSE, NFS, NBD and EBS to name a few. -[Portworx Volume Plugin](https://github.com/portworx/px-dev) | A volume plugin that turns any server into a scale-out converged compute/storage node, providing container granular storage and highly available volumes across any node, using a shared-nothing storage backend that works with any docker scheduler. -[Quobyte Volume Plugin](https://github.com/quobyte/docker-volume) | A volume plugin that connects Docker to [Quobyte](http://www.quobyte.com/containers)'s data center file system, a general-purpose scalable and fault-tolerant storage platform. -[REX-Ray plugin](https://github.com/emccode/rexray) | A volume plugin which is written in Go and provides advanced storage functionality for many platforms including VirtualBox, EC2, Google Compute Engine, OpenStack, and EMC. -[Virtuozzo Storage and Ploop plugin](https://github.com/virtuozzo/docker-volume-ploop) | A volume plugin with support for Virtuozzo Storage distributed cloud file system as well as ploop devices. -[VMware vSphere Storage Plugin](https://github.com/vmware/docker-volume-vsphere) | Docker Volume Driver for vSphere enables customers to address persistent storage requirements for Docker containers in vSphere environments. +| Plugin | Description | +|:---------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Azure File Storage plugin](https://github.com/Azure/azurefile-dockervolumedriver) | Lets you mount Microsoft [Azure File Storage](https://azure.microsoft.com/blog/azure-file-storage-now-generally-available/) shares to Docker containers as volumes using the SMB 3.0 protocol. [Learn more](https://azure.microsoft.com/blog/persistent-docker-volumes-with-azure-file-storage/). | +| [BeeGFS Volume Plugin](https://github.com/RedCoolBeans/docker-volume-beegfs) | An open source volume plugin to create persistent volumes in a BeeGFS parallel file system. | +| [Blockbridge plugin](https://github.com/blockbridge/blockbridge-docker-volume) | A volume plugin that provides access to an extensible set of container-based persistent storage options. It supports single and multi-host Docker environments with features that include tenant isolation, automated provisioning, encryption, secure deletion, snapshots and QoS. | +| [Contiv Volume Plugin](https://github.com/contiv/volplugin) | An open source volume plugin that provides multi-tenant, persistent, distributed storage with intent based consumption. It has support for Ceph and NFS. | +| [Convoy plugin](https://github.com/rancher/convoy) | A volume plugin for a variety of storage back-ends including device mapper and NFS. It's a simple standalone executable written in Go and provides the framework to support vendor-specific extensions such as snapshots, backups and restore. | +| [DigitalOcean Block Storage plugin](https://github.com/omallo/docker-volume-plugin-dostorage) | Integrates DigitalOcean's [block storage solution](https://www.digitalocean.com/products/storage/) into the Docker ecosystem by automatically attaching a given block storage volume to a DigitalOcean droplet and making the contents of the volume available to Docker containers running on that droplet. | +| [DRBD plugin](https://www.drbd.org/en/supported-projects/docker) | A volume plugin that provides highly available storage replicated by [DRBD](https://www.drbd.org). Data written to the docker volume is replicated in a cluster of DRBD nodes. | +| [Flocker plugin](https://clusterhq.com/docker-plugin/) | A volume plugin that provides multi-host portable volumes for Docker, enabling you to run databases and other stateful containers and move them around across a cluster of machines. | +| [Fuxi Volume Plugin](https://github.com/openstack/fuxi) | A volume plugin that is developed as part of the OpenStack Kuryr project and implements the Docker volume plugin API by utilizing Cinder, the OpenStack block storage service. | +| [gce-docker plugin](https://github.com/mcuadros/gce-docker) | A volume plugin able to attach, format and mount Google Compute [persistent-disks](https://cloud.google.com/compute/docs/disks/persistent-disks). | +| [GlusterFS plugin](https://github.com/calavera/docker-volume-glusterfs) | A volume plugin that provides multi-host volumes management for Docker using GlusterFS. | +| [Horcrux Volume Plugin](https://github.com/muthu-r/horcrux) | A volume plugin that allows on-demand, version controlled access to your data. Horcrux is an open-source plugin, written in Go, and supports SCP, [Minio](https://www.minio.io) and Amazon S3. | +| [HPE 3Par Volume Plugin](https://github.com/hpe-storage/python-hpedockerplugin/) | A volume plugin that supports HPE 3Par and StoreVirtual iSCSI storage arrays. | +| [Infinit volume plugin](https://infinit.sh/documentation/docker/volume-plugin) | A volume plugin that makes it easy to mount and manage Infinit volumes using Docker. | +| [IPFS Volume Plugin](http://github.com/vdemeester/docker-volume-ipfs) | An open source volume plugin that allows using an [ipfs](https://ipfs.io/) filesystem as a volume. | +| [Keywhiz plugin](https://github.com/calavera/docker-volume-keywhiz) | A plugin that provides credentials and secret management using Keywhiz as a central repository. | +| [Local Persist Plugin](https://github.com/CWSpear/local-persist) | A volume plugin that extends the default `local` driver's functionality by allowing you specify a mountpoint anywhere on the host, which enables the files to *always persist*, even if the volume is removed via `docker volume rm`. | +| [NetApp Plugin](https://github.com/NetApp/netappdvp) (nDVP) | A volume plugin that provides direct integration with the Docker ecosystem for the NetApp storage portfolio. The nDVP package supports the provisioning and management of storage resources from the storage platform to Docker hosts, with a robust framework for adding additional platforms in the future. | +| [Netshare plugin](https://github.com/ContainX/docker-volume-netshare) | A volume plugin that provides volume management for NFS 3/4, AWS EFS and CIFS file systems. | +| [Nimble Storage Volume Plugin](https://connect.nimblestorage.com/community/app-integration/docker) | A volume plug-in that integrates with Nimble Storage Unified Flash Fabric arrays. The plug-in abstracts array volume capabilities to the Docker administrator to allow self-provisioning of secure multi-tenant volumes and clones. | +| [OpenStorage Plugin](https://github.com/libopenstorage/openstorage) | A cluster-aware volume plugin that provides volume management for file and block storage solutions. It implements a vendor neutral specification for implementing extensions such as CoS, encryption, and snapshots. It has example drivers based on FUSE, NFS, NBD and EBS to name a few. | +| [Portworx Volume Plugin](https://github.com/portworx/px-dev) | A volume plugin that turns any server into a scale-out converged compute/storage node, providing container granular storage and highly available volumes across any node, using a shared-nothing storage backend that works with any docker scheduler. | +| [Quobyte Volume Plugin](https://github.com/quobyte/docker-volume) | A volume plugin that connects Docker to [Quobyte](http://www.quobyte.com/containers)'s data center file system, a general-purpose scalable and fault-tolerant storage platform. | +| [REX-Ray plugin](https://github.com/emccode/rexray) | A volume plugin which is written in Go and provides advanced storage functionality for many platforms including VirtualBox, EC2, Google Compute Engine, OpenStack, and EMC. | +| [Virtuozzo Storage and Ploop plugin](https://github.com/virtuozzo/docker-volume-ploop) | A volume plugin with support for Virtuozzo Storage distributed cloud file system as well as ploop devices. | +| [VMware vSphere Storage Plugin](https://github.com/vmware/docker-volume-vsphere) | Docker Volume Driver for vSphere enables customers to address persistent storage requirements for Docker containers in vSphere environments. | ### Authorization plugins - Plugin | Description -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -[Casbin AuthZ Plugin](https://github.com/casbin/casbin-authz-plugin) | An authorization plugin based on [Casbin](https://github.com/casbin/casbin), which supports access control models like ACL, RBAC, ABAC. The access control model can be customized. The policy can be persisted into file or DB. -[HBM plugin](https://github.com/kassisol/hbm) | An authorization plugin that prevents from executing commands with certains parameters. -[Twistlock AuthZ Broker](https://github.com/twistlock/authz) | A basic extendable authorization plugin that runs directly on the host or inside a container. This plugin allows you to define user policies that it evaluates during authorization. Basic authorization is provided if Docker daemon is started with the --tlsverify flag (username is extracted from the certificate common name). +| Plugin | Description | +|:---------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Casbin AuthZ Plugin](https://github.com/casbin/casbin-authz-plugin) | An authorization plugin based on [Casbin](https://github.com/casbin/casbin), which supports access control models like ACL, RBAC, ABAC. The access control model can be customized. The policy can be persisted into file or DB. | +| [HBM plugin](https://github.com/kassisol/hbm) | An authorization plugin that prevents from executing commands with certains parameters. | +| [Twistlock AuthZ Broker](https://github.com/twistlock/authz) | A basic extendable authorization plugin that runs directly on the host or inside a container. This plugin allows you to define user policies that it evaluates during authorization. Basic authorization is provided if Docker daemon is started with the --tlsverify flag (username is extracted from the certificate common name). | ## Troubleshooting a plugin From 1e3666a731400722c9d440cf197a946012172c34 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 25 Jul 2017 18:24:17 +0200 Subject: [PATCH 5/5] Update API plugin response examples Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 4735c7663201ce1bf618e2aa505d7813a331be3f) Signed-off-by: Sebastiaan van Stijn --- components/engine/api/swagger.yaml | 129 ++++++++++---------------- components/engine/api/types/plugin.go | 2 +- 2 files changed, 48 insertions(+), 83 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 630278ecde..0c54404566 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -1349,26 +1349,33 @@ definitions: Name: type: "string" x-nullable: false + example: "some-mount" Description: type: "string" x-nullable: false + example: "This is a mount that's used by the plugin." Settable: type: "array" items: type: "string" Source: type: "string" + example: "/var/lib/docker/plugins/" Destination: type: "string" x-nullable: false + example: "/mnt/state" Type: type: "string" x-nullable: false + example: "bind" Options: type: "array" items: type: "string" - + example: + - "rbind" + - "rw" PluginDevice: type: "object" required: [Name, Description, Settable, Path] @@ -1386,6 +1393,7 @@ definitions: type: "string" Path: type: "string" + example: "/dev/fuse" PluginEnv: type: "object" @@ -1427,13 +1435,16 @@ definitions: properties: Id: type: "string" + example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" Name: type: "string" x-nullable: false + example: "tiborvass/sample-volume-plugin" Enabled: - description: "True when the plugin is running. False when the plugin is not running, only installed." + description: "True if the plugin is running. False if the plugin is not running, only installed." type: "boolean" x-nullable: false + example: true Settings: description: "Settings that can be modified by users." type: "object" @@ -1448,6 +1459,8 @@ definitions: type: "array" items: type: "string" + example: + - "DEBUG=0" Args: type: "array" items: @@ -1460,6 +1473,7 @@ definitions: description: "plugin remote reference used to push/pull the plugin" type: "string" x-nullable: false + example: "localhost:5000/tiborvass/sample-volume-plugin:latest" Config: description: "The config of a plugin." type: "object" @@ -1483,12 +1497,15 @@ definitions: description: "Docker Version used to create the plugin" type: "string" x-nullable: false + example: "17.06.0-ce" Description: type: "string" x-nullable: false + example: "A sample volume plugin for Docker" Documentation: type: "string" x-nullable: false + example: "https://docs.docker.com/engine/extend/plugins/" Interface: description: "The interface between Docker and the plugin" x-nullable: false @@ -1499,16 +1516,23 @@ definitions: type: "array" items: $ref: "#/definitions/PluginInterfaceType" + example: + - "docker.volumedriver/1.0" Socket: type: "string" x-nullable: false + example: "plugins.sock" Entrypoint: type: "array" items: type: "string" + example: + - "/usr/bin/sample-volume-plugin" + - "/data" WorkDir: type: "string" x-nullable: false + example: "/bin/" User: type: "object" x-nullable: false @@ -1516,9 +1540,11 @@ definitions: UID: type: "integer" format: "uint32" + example: 1000 GID: type: "integer" format: "uint32" + example: 1000 Network: type: "object" x-nullable: false @@ -1527,6 +1553,7 @@ definitions: Type: x-nullable: false type: "string" + example: "host" Linux: type: "object" x-nullable: false @@ -1536,9 +1563,13 @@ definitions: type: "array" items: type: "string" + example: + - "CAP_SYS_ADMIN" + - "CAP_SYSLOG" AllowAllDevices: type: "boolean" x-nullable: false + example: false Devices: type: "array" items: @@ -1546,12 +1577,15 @@ definitions: PropagatedMount: type: "string" x-nullable: false + example: "/mnt/volumes" IpcHost: type: "boolean" x-nullable: false + example: false PidHost: type: "boolean" x-nullable: false + example: false Mounts: type: "array" items: @@ -1560,6 +1594,11 @@ definitions: type: "array" items: $ref: "#/definitions/PluginEnv" + example: + - Name: "DEBUG" + Description: "If set, prints debug messages" + Settable: null + Value: "0" Args: type: "object" x-nullable: false @@ -1568,9 +1607,11 @@ definitions: Name: x-nullable: false type: "string" + example: "args" Description: x-nullable: false type: "string" + example: "command line arguments" Settable: type: "array" items: @@ -1584,50 +1625,14 @@ definitions: properties: type: type: "string" + example: "layers" diff_ids: type: "array" items: type: "string" - example: - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" - Name: "tiborvass/sample-volume-plugin" - Tag: "latest" - Active: true - Settings: - Env: - - "DEBUG=0" - Args: null - Devices: null - Config: - Description: "A sample volume plugin for Docker" - Documentation: "https://docs.docker.com/engine/extend/plugins/" - Interface: - Types: - - "docker.volumedriver/1.0" - Socket: "plugins.sock" - Entrypoint: - - "/usr/bin/sample-volume-plugin" - - "/data" - WorkDir: "" - User: {} - Network: - Type: "" - Linux: - Capabilities: null - AllowAllDevices: false - Devices: null - Mounts: null - PropagatedMount: "/data" - Env: - - Name: "DEBUG" - Description: "If set, prints debug messages" - Settable: null - Value: "0" - Args: - Name: "args" - Description: "command line arguments" - Settable: null - Value: [] + example: + - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887" + - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" ObjectVersion: description: | @@ -6887,46 +6892,6 @@ paths: type: "array" items: $ref: "#/definitions/Plugin" - example: - - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" - Name: "tiborvass/sample-volume-plugin" - Tag: "latest" - Active: true - Settings: - Env: - - "DEBUG=0" - Args: null - Devices: null - Config: - Description: "A sample volume plugin for Docker" - Documentation: "https://docs.docker.com/engine/extend/plugins/" - Interface: - Types: - - "docker.volumedriver/1.0" - Socket: "plugins.sock" - Entrypoint: - - "/usr/bin/sample-volume-plugin" - - "/data" - WorkDir: "" - User: {} - Network: - Type: "" - Linux: - Capabilities: null - AllowAllDevices: false - Devices: null - Mounts: null - PropagatedMount: "/data" - Env: - - Name: "DEBUG" - Description: "If set, prints debug messages" - Settable: null - Value: "0" - Args: - Name: "args" - Description: "command line arguments" - Settable: null - Value: [] 500: description: "Server error" schema: diff --git a/components/engine/api/types/plugin.go b/components/engine/api/types/plugin.go index ed3c2c26e4..cab333e01a 100644 --- a/components/engine/api/types/plugin.go +++ b/components/engine/api/types/plugin.go @@ -11,7 +11,7 @@ type Plugin struct { // Required: true Config PluginConfig `json:"Config"` - // True when the plugin is running. False when the plugin is not running, only installed. + // True if the plugin is running. False if the plugin is not running, only installed. // Required: true Enabled bool `json:"Enabled"`