Beginning DevOps with Docker
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Acquisition Editor: Koushik Sen
Content Development Editor: Darren Patel
Production Coordinators: Vishal Pawar, Samita Warang
First published: May 2018
Production reference: 1310518
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78953-240-1
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
- Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
- Learn better with Skill Plans built especially for you
- Get a free eBook or video every month
- Mapt is fully searchable
- Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Joseph Muli is a DevOps engineer with three years of experience of extensive innovation and development. He has worked with Python and Bash, building a deep love for scripting and automation. He's currently focusing on monitoring, logging, and maintenance, three key data reference points in any environment.
You can get in touch with him on GitHub: mrmuli or on Twitter: @the_codeartist.
About the reviewer
John Kariuki has been developing software that helps migrate to a scalable microservice architecture for over 11 years now. He founded a start-up straight out of campus and has been a prominent member of the tech community in Nairobi. Outside of programming, John has an interest in writing blog posts and photography.
He's currently placed with First Access, an Andela partner and New York based credit scoring and profiling platform for microlenders in emerging markets.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
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
, 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.
, 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.
, 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.
Tip
Tips and tricks appear like this.
Reader Feedback