Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Extending Docker

You're reading from   Extending Docker Master the art of making Docker more extensible, composable, and modular by leveraging plugins and other supporting tools

Arrow left icon
Product type Paperback
Published in Jun 2016
Publisher Packt
ISBN-13 9781786463142
Length 334 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Russ McKendrick Russ McKendrick
Author Profile Icon Russ McKendrick
Russ McKendrick
Arrow right icon
View More author details
Toc

Understanding a plugin


So far, we have established that all the plugins that we have installed have actually nothing to do with Docker directly, so what does a plugin do?

Docker describes a plugin as:

"Docker plugins are out-of-process extensions which add capabilities to the Docker Engine."

This is exactly what we have seen when installing third-party tools, they all run alongside Docker as separate daemons.

Let's assume that we are going to be creating a volume plugin called mobyfs for the remainder of this chapter. The mobyfs plugin is a fictional service which is written in Go and it runs as a daemon.

Discovery

Typically, a plugin will be installed on the same host as the Docker binary. We can register our mobyfs plugin with Docker by creating the following files in either /run/docker/plugins if it's a Unix socket file, or /etc/docker/plugins or /usr/lib/docker/plugins if it is one of the other two files:

  • mobyfs.sock

  • mobyfs.spec

  • mobyfs.json

Plugins that use a Unix socket file must run on...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image