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
Extending Docker
Extending Docker

Extending Docker: Master the art of making Docker more extensible, composable, and modular by leveraging plugins and other supporting tools

Arrow left icon
Profile Icon Russ McKendrick
Arrow right icon
€18.99 per month
Paperback Jun 2016 334 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Russ McKendrick
Arrow right icon
€18.99 per month
Paperback Jun 2016 334 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Extending Docker

Chapter 2. Introducing First-party Tools

Docker provides several tools that extend the functionality outside of the core Docker engine. In this chapter, you will walk-through installing, configuring, and running the following tools:

  • Docker Toolbox
  • Docker Machine
  • Docker Swarm
  • Docker Compose

These tools, while not as functional as some of the more advanced ones that we will be working with in the upcoming chapters, will serve as a good introduction to both adding additional functionality to core Docker engine as well as concepts for deploying and orchestrating your containers, which we will be doing more of towards the end of the book.

Docker Toolbox

Before we start to look at how to use the three other tools, we should look at installing them on our local machine. In the previous chapter, we downloaded a script supplied by Docker and piped it through bash to quickly configure the official Docker YUM or APT repository (depending on the operating system you are running) on an already provisioned server, the command we executed was as follows:

curl -sSL https://get.docker.com/ | sh

This is useful if you already have a Linux-based server up and running on one of the many cloud services or locally on virtual machine; however, what if you want to install Docker on a non-Linux operating system such as Mac OSX or Windows?

Tip

Always check the source. It is best practice to check the source of the bash script that you are going to be downloading and installing; in our case, you can check this by going to https://get.docker.com/ in your browser.

Before we look at the tools that Docker provides to do just that, we should answer the...

Docker Machine

So, when you ran the Docker Quickstart Terminal application, it created a bunch of certificates, SSH keys, and configured your user's environment to run Docker. It also launched a virtual machine running Docker.

Developing locally

The Docker Quickstart Terminal application did this using Docker machine, you can check the status of the machine launched by the application by running the following command:

docker-machine active

This will list the names of any active machines, the default machine launched when you first install Docker is called default, if you run:

docker-machine status default

It should tell you that the virtual machine is currently running. Finally, you should be able to SSH into the virtual machine by running the following command:

docker-machine ssh default

You will notice that when you SSH into the virtual machine, it is running the Boot2Docker distribution.

Note

Boot2Docker is an extremely lightweight Linux distribution based on Tiny Core Linux, and its one...

Docker Swarm

Now that we have discussed how to launch individual Docker instances using Docker Machine, let's get a little more adventurous and create a cluster of instances. To do this, Docker ships a tool called Swarm. When deployed, it acts as a scheduler between your Docker client and host Docker instances, deciding where to launch containers based on scheduling rules.

Creating a local cluster

To start off, we are going to be using Docker Machine to create a cluster locally using VirtualBox (https://www.virtualbox.org), which is bundled with Docker Toolbox. To start, we are going to launch a VM to generate a discovery token. To do this, run the following commands:

docker-machine create -d virtualbox discover

Then configure your Docker client to use the newly created local instance:

eval "$(docker-machine env discover)"

You can check that your Docker client is configured to use the discover instance by running docker-machine ls and making sure that discover has a star in the...

Docker Compose

So far in our exploration of the tools that ship with Docker Toolbox, we have been using services which manage our Docker host machines, the final service that we are going to look at in this chapter deals with containers. I am sure that you will agree that so far the tools provided by Docker are quite intuitive, Docker Compose is no different. It start off life as third-party service called Fig and was written by Orchard Labs (the project's original website is still available at http://fig.sh/).

The original project's goal was the following:

"Provide fast, isolated development environments using Docker"

Since Fig became part of Docker, they haven't strayed too far from the original goal:

"Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application's services. Then, using a single command, you create and start all the services from your configuration.&quot...

Summary

In this chapter, we have covered the additional client tools provided by Docker to extend the functionality of your core Docker installation, all of the tools that we have looked at have been designed to slot into your workflow and be as simple as possible to use. In the later chapters, we will be looking at how to expand some of the core functionality of Docker using third-party services. When we do, we will revisit a few of the tools that we have been through in this chapter and look at how they add additional functionality to them.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Get the first book on the market that shows you how to extend the capabilities of Docker using plugins and third-party tools
  • Master the skills of creating various plugins and integrating great tools in order to enhance the functionalities of Docker
  • A practical and learning guide that ensures your investment in Docker becomes more valuable

Description

With Docker, it is possible to get a lot of apps running on the same old servers, making it very easy to package and ship programs. The ability to extend Docker using plugins and load third-party plugins is incredible, and organizations can massively benefit from it. In this book, you will read about what first and third party tools are available to extend the functionality of your existing Docker installation and how to approach your next Docker infrastructure deployment. We will show you how to work with Docker plugins, install it, and cover its lifecycle. We also cover network and volume plugins, and you will find out how to build your own plugin. You’ll discover how to integrate it with Puppet, Ansible, Jenkins, Flocker, Rancher, Packer, and more with third-party plugins. Then, you’ll see how to use Schedulers such as Kubernetes and Amazon ECS. Finally, we’ll delve into security, troubleshooting, and best practices when extending Docker. By the end of this book, you will learn how to extend Docker and customize it based on your business requirements with the help of various tools and plugins.

Who is this book for?

This book is for developers and sys admins who are well versed Docker and have knowledge on basic programming languages. If you can’t wait to extend Docker and customize it to meet your requirements, this is the book for you!

What you will learn

  • Find out about Docker plugins and the problems they solve
  • Gain insights into creating your own plugin
  • Use Docker tools to extend the basic functionality of the core Docker engine
  • Get to grips with the installation and configuration of third-party tools available to use with Docker plugins
  • Install, configure, and use a scheduling service to manage the containers in your environment
  • Enhance your day-to-day Docker usage through security, troubleshooting, and best practices

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 16, 2016
Length: 334 pages
Edition : 1st
Language : English
ISBN-13 : 9781786463142
Vendor :
Docker
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Jun 16, 2016
Length: 334 pages
Edition : 1st
Language : English
ISBN-13 : 9781786463142
Vendor :
Docker
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 74.98
Monitoring Docker
€32.99
Extending Docker
€41.99
Total 74.98 Stars icon
Banner background image

Table of Contents

9 Chapters
1. Introduction to Extending Docker Chevron down icon Chevron up icon
2. Introducing First-party Tools Chevron down icon Chevron up icon
3. Volume Plugins Chevron down icon Chevron up icon
4. Network Plugins Chevron down icon Chevron up icon
5. Building Your Own Plugin Chevron down icon Chevron up icon
6. Extending Your Infrastructure Chevron down icon Chevron up icon
7. Looking at Schedulers Chevron down icon Chevron up icon
8. Security, Challenges, and Conclusions Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.