Docker Plugins Cheatsheet
Docker plugins extend the core functionality of the Docker Engine. They are typically installed on the Docker host and provide services to containers, such as advanced storage or networking capabilities.
Common Plugin Types
| Plugin Type | Description |
|---|
| Volume Plugins | Integrate Docker with third-party storage solutions, like network-attached storage or cloud storage. This is essential for remote volumes. |
| Network Plugins | Enable Docker to use advanced networking features, such as creating custom overlay networks that allow containers on different hosts to communicate seamlessly. |
| Credential/Secret Management | Integrate with external secret storage services to securely provide sensitive data to containers at runtime. |
| Logging Plugins | Allow you to send container logs to different log management systems. |
Managing Plugins
| Command | Description |
|---|
docker plugin install [PLUGIN_NAME] | Installs a plugin from Docker Hub or a specified registry. The plugin is downloaded, enabled, and ready to use. This is the primary way to get a new plugin. |
docker plugin ls | Lists all installed plugins on your system, showing their status (e.g., enabled, disabled). |
docker plugin enable [PLUGIN_NAME] | Enables a disabled plugin. |
docker plugin disable [PLUGIN_NAME] | Disables an enabled plugin. |
docker plugin rm [PLUGIN_NAME] | Removes a plugin from your system. You must disable it first. |
Popular Plugins
- Volume Plugins
- REX-Ray: Provides persistent storage from many platforms (AWS, Google Cloud, OpenStack).
- Flocker: Offers multi-host portable volumes for databases and stateful containers.
- Network Plugins
- Weave Net: Creates a virtual network that connects Docker containers across multiple hosts.
- Calico: A networking and network security solution for containers, VMs, and bare-metal hosts.
- Credential/Secret Management
- Docker Vault Plugin: Integrates with HashiCorp Vault to securely inject secrets into containers.
- Logging Plugins
- Splunk: Sends container logs to a Splunk logging server.