Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Powerstrip: A Tool for Prototyping Docker Extensions

Powerstrip: A Tool for Prototyping Docker Extensions

This item in japanese


ClusterHQ, the team behind Flocker, have announced Powerstrip, an Apache licensed tool to prototype Docker extensions. Powerstrip works as a proxy between the Docker command line interface (CLI) and the Docker daemon allowing the Docker API to be extended. The main advantage of this approach is that by extending the Docker interface, rather than wrapping the Docker CLI, it becomes much easier to compose together Docker add ons such as Flocker or Weave.

The term ‘adapters’ is used to differentiate between things that are prototypes running in Powerstrip and the ‘extensions’ that might subsequently be created. Pre-hook adapters are used to intercept Docker API invocations, and post-hook adapters can intercept an API response. Powerstrip itself is written in Python, but adapters can be created in any language. Multiple adapters may be chained together, which is how the previous conflicts caused by tools wrapping the Docker CLI are avoided.

Powerstrip itself is delivered as a Docker image, and as adapters need only implement an HTTP endpoint they too can be implemented in containers. Powerstrip doesn’t implement any security on its API endpoint, so it comes with strong health warnings that it should only be used ‘in private, secure development environments’.

The target audience of this project is folks who to want to write Docker extensions, not end users. See the Powerstrip adapters section below for a list of adapters that you can use with Docker.

Flocker and Weave are both examples of tools that have wrapped the Docker CLI, and hence couldn’t be composed together (or work in conjunction with application composition tools such as Fig). The Weaveworks team have already released powerstrip-weave, which implements a Powerstrip adapter. Shortly afterwards it was demonstrated that Weave and Flocker could be brought together to provide networking and volume management to a single application (the Crate database). Weaveworks CEO Alexis Richardson has described this as a move towards, “killer use cases like live container migration”. The ClusterHQ announcement post includes a video demo, and videos of the Crate demo and powerstrip-weave used with Fig.

The project has received an enthusiastic response from Docker CTO Solomon Hykes:

There is a huge demand for customizing and extending Docker without breaking its standard API. Hundreds of Docker contributors are collaborating to make it happen. Powerstrip will help them experiment faster, without having to patch and rebuild Docker every time. It’s a huge time saver and will help us find the right design faster. A must have if you’re into hacking and customizing Docker.

Efforts are already underway to port Powerstrip to Go, which will result in a smaller implementation that’s better aligned with the core of Docker development. It seems possible that as well as being a prototyping mechanism for Docker extensions Powerstrip might also be a prototype of the Docker extension system.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p