Hands on Docker
Dedicated to the people I love and the God I trust.
Navin Sabharwal
Dedicated to people who made my life worth living and carved me into an individual I am today and to God who shades every step of my life.
Bibin W
Contents at a Glance
1: Linux Container
2: Docker
3: Docker Installation
4: Working With Images and Container
5: Docker Container Linking and Data Management
6: Building images and containers from scratch using Dockerfile
7: Testing and building containers using Jenkins
8: Docker Provisioning using Chef and Vagrant
9: Deployment, Service Discovery and Orchestration tools for Docker
10: Networking, Security and Docker APIs
11: Cloud Based Container Services
Contents
About the Authors
Navin Sabharwal is an innovator, thought leader, author, and consultant in the areas of virtualization, cloud computing, big data and analytics.
Navin has created niche award-winning products and solutions and has filed numerous patents in diverse fields such as IT services, virtual machine placement, cloud capacity analysis, assessment engines, ranking algorithms, capacity planning engines, and knowledge management.
Navin holds a Masters in Information Technology and is a Certified Project Management Professional.
Navin has authored the following books: Cloud Computing First Steps (Publisher: CreateSpace, ISBN#: 978-1478130086), Apache Cloudstack Cloud Computing (Publisher: Packt Publishing, ISBN#: 978-1782160106), Cloud Capacity Management (Publisher Apress, ISBN #: 978-1430249238)
Bibin W has been working with virtualization and cloud technologies, he is a subject matter expert in VMware, Linux Container, Docker, Amazon Web Services, Chef and Azure.
Bibin holds a Masters in Computer Science from SRM University, Chennai.
The authors can be reached at .
Acknowledgments
Special thanks go out to the people who have helped in creation of this book Dheeraj Raghav for his creative inputs in the design of this book, Piyush Pandey for his reviews and insights into the content.
The authors will like to acknowledge the creators of virtualization technologies and the open source community for providing such powerful tools and technologies and enable products and solutions which solve real business problems easily and quickly.
Preface
Docker is making waves in the technology circles and is rapidly gaining mindshare from developers, startups, technology companies and architects.
We all know how virtualization has changed the datacenter and cloud forever, virtualization has allowed enterprises and cloud providers to make the datacenter more agile, manageable, cloud friendly and application friendly. However virtualization has overheads of the guest operating system and costly licensing for virtualization software, thus limiting the utilization of the host.
The Containerization technology is seeing resurgence with Docker, containerization has been around since many years, and however it is now that Docker has revived the interest of the technology community in containers.
Fundamental support for containerization was actually included in the Linux 2.6.24 kernel to provide operating system-level virtualization and allow a single host to operate multiple isolated Linux instances, called Linux Containers (LXC). LXC is based on Linux control groups (cgroups) where every control group can offer applications complete resource isolation (including processor, memory and I/O access). Linux Containers also offer complete isolation for the container's namespace, so supporting functions like file systems, user IDs, network IDs and other elements usually associated with operating systems are unique for each container.
Docker uses the container technology but creates a layer above the LXC layer for packaging, deployment and migration of workloads to different hosts.
Docker container technology has taken the cloud and application development world by storm since it was open-sourced a little over a year ago, offering a way to package and deploy applications across a variety of Linux instances.
Enterprises stand to gain by further reducing the datacenter footprint and using the hosts resources to their maximum using the Docker and LXC technology. Coupled with the ease of migration and fast scale out of containers it is turning out to be a technology which is well suited for the cloud use case.
Docker is also going to have an impact on the devops lifecycle, by providing capabilities to support immutable infrastructure model, technologies like Docker may fundamentally change the way the operations world works, rather than updating the current running instances of operating systems, organizations may move to a model where the server container itself is replaced with a newer version and the old ones are taken out.
This book will help our readers to appreciate the Docker technology, the benefits and features provided by Docker and get a deep dive technical perspective on architecting solutions using Docker.
The book will enable a reader to appreciate, install, configure, administer and deploy applications on the Docker platform.
We sincerely hope our readers will enjoy reading the book as much as we have enjoyed writing it.
About this book
This book
- Introduces Docker to readers, the core concepts and technology behind Docker.
- Provides hands on examples for installing and configuring Docker
- Provides insight into packaging applications using Docker and deploying them.
- Provides step by step guidelines to have your Docker setup ready
- Detailed coverage of Mesosphere for Docker deployment and management
- Detailed coverage of Kubernetes clusters and Fleet.
- Hands on coverage of deployment tools including Fig, Shipyard and Panamax
- Step by Step guidelines to help you package your application on Docker
- Introduction to Google Container Engine for Docker
What you need for this book
Docker supports the most popular Linux and UNIX platforms.
Download the latest stable production release of Docker from the following URL:
https://docs.Docker.com/installation/
In this book we have focused on using Docker on a 64-bit Ubuntu 14.04 platform and at places have cited references on how to work with Docker running on other Linux and windows platforms.
At the time of writing, the latest stable Docker production release is 1.3.1
We will be using 64-bit Ubuntu 14.04 for examples of the installation process.
Conventions Used In the Book
Italic indicates important points, commands.
This is used to denote the Code Commands
This is the Output of the command
This is used for Example commands
This icon indicates statistics figures
This icon indicates examples
This icon indicates points to be noted.
This icon indicates further reading links or references.
Who this book is for
This book would be of interest to Virtualization Professionals, Cloud Architects, technology enthusiasts, Application Developers.
The book covers aspects on Docker and provides advanced guidance on planning and deploying the Docker technology for creating Infrastructure as a Service Clouds to using the technology to package and deploy your applications.
Next page