Book Image

Beginning DevOps with Docker

By : Joseph Muli
5 (1)
Book Image

Beginning DevOps with Docker

5 (1)
By: Joseph Muli

Overview of this book

Making sure that your application runs across different systems as intended is quickly becoming a standard development requirement. With Docker, you can ensure that what you build will behave the way you expect it to, regardless of where it's deployed. By guiding you through Docker from start to finish (from installation, to the Docker Registry, all the way through to working with Docker Swarms), we’ll equip you with the skills you need to migrate your workflow to Docker with complete confidence.
Table of Contents (7 chapters)

Preface

DevOps with Docker outlines the power of containerization and the influence this innovation has on development teams and general operations. We also get to understand what DevOps really is, the principles involved, and how the process contributes to product health, by implementing a Docker workflow. Docker is an open source containerization tool that makes it easier to streamline product delivery and reduce the time it takes to get from a whiteboard sketch of the business to a money-back implementation.

The book will provide knowledge of the following:

  • Docker and DevOps and why and how they integrate

  • What containers are, and how to create and manage them

  • Scaling a delivery pipeline and multiple deployments with Docker

  • Orchestration and delivery of containerized applications

Lesson 1, Images and Containers, shows how Docker improved a DevOps workflow and the basic Docker terminal commands that will be used in this book. We will learn the Dockerfile syntax in order to build images. We will run containers from images. We will then version images and Docker hub and deploy a Docker image to the Docker hub.

Lesson 2, Application Container Management, explores the docker-compose tool and gives an overview of a multi-container application setup. We will then manage multiple containers and distribute application bundles. Lastly, we will network with docker-compose.

Lesson 3, Orchestration and Delivery, gives us an overview of a Docker Swarm. We will then use the Docker engine to create a Swarm and manage services and applications in a Swarm. Finally, we will scale services up and down to test for a real-world application scenario.

Hardware

This book will require the following minimum hardware requirements:

  • Processor: 1.8 GHz or higher (Core 2 Duo and above)

  • Memory: Minimum 2GB RAM

  • Hard disk: Minimum 10 GB

  • A stable internet connection (for pulling and pushing images)

Software

  • Operating System: Windows 8 or higher

  • Browser: Google Chrome or Mozilla Firefox (latest updates installed)

  • Docker installed

Who This Book is for

This book is ideal for developers, system architects, junior and mid-level site reliability engineers who wish to adopt Docker workflow for consistency, speed, and isolation in applications. You need to have a basic knowledge about UNIX concepts such as ssh, ports, and logs as we dive into Docker.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Once you have created a new directory, access the directory and create a file called run.js."

Any command-line input or output is written as follows:

docker pull

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader Feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer Support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the Example Code

You can download the example code files for this book from your account at https://github.com/TrainingByPackt/Beginning-DevOps-with-Docker. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Installation

Before you start with this course, we'll install Docker. You will find the steps to install it here:

Visit to the Docker Toolbox page below: https://docs.docker.com/toolbox/toolbox_install_windows/ in your browser.

  1. Click the installer link to download.

  2. Install Docker Toolbox by double-clicking the installer.

  3. Press Next to accept all the defaults and then install.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.