Chapter 7. Putting It All Together

In this, our final chapter, we will look at how we put everything we have learned in the previous chapters together along with how it could fit with your development and deployment workflows.

Also, we will talk about how to best describe Docker to others, typically you will find that people will assume that Docker containers are just like virtual machines. We will also look at what the benefits are along with some use cases.

Workflows

The first five chapters of this book work through a typical workflow for working with Docker containers through development all the way through to production:

  • Local development & packaging (Chapter 1, Installing Docker Locally and Chapter 2, Launching Applications Using Docker)
  • Staging and remote testing (Chapter 3, Docker in the Cloud)
  • Production (Chapter 4, Docker Swarm and Chapter 5, Docker Plugins)
  • On-going support (Chapter 6, Troubleshooting and Monitoring)

In our first few chapters we learned how to install and interact with Docker locally, typically when developing an application or software stack a developer or system administrator will test locally first.

Once the application / stack has been fully developed you can share it using the Docker Hub as both a public or private image, or if your image contains things you do now want to distribute via a third party you can host your own Docker Registry.

Once you have your packaged image, you may need other people to test it. As your image is available in a registry your colleagues or friends can pull your image and run it as you intended locally on their own machine without the worry of having to install and configure either your application or software stack.

If you need people to test remotely then you can spin up a Docker host on a public cloud provider and quickly deploy your application or software stack there.

Once everyone is happy you can deploy your application / software stack a servicein a multi-host cluster running Docker Swarm, this means that your service will be running in both a highly available and easy maintain environment. Deploying as a service will also allow you to easily roll out updates for your application or software stack using Swarms in-built service update features.

If you need share or persist storage between your containers or hosts then you can install one of the many volume plugins, likewise if you need to something more advanced than the multi-host networking provided by Swarm, no problem, replace it with a network plugin, remember "batteries included, but replaceable".

Finally, if you need to debug your images or running container you can use the commands and tools discussed in Chapter 6, Troubleshooting and Monitoring.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset