Book Image

Docker Quick Start Guide

By : Earl Waud
Book Image

Docker Quick Start Guide

By: Earl Waud

Overview of this book

Docker is an open source software platform that helps you with creating, deploying, and running your applications using containers. This book is your ideal introduction to Docker and containerization. You will learn how to set up a Docker development environment on a Linux, Mac, or Windows workstation, and learn your way around all the commands to run and manage your Docker images and containers. You will explore the Dockerfile and learn how to build your own enterprise-grade Docker images. Then you will learn about Docker networks, Docker swarm, and Docker volumes, and how to use these features with Docker stacks in order to define, deploy, and maintain highly-scalable, fault-tolerant multi-container applications. Finally, you will learn how to leverage Docker with Jenkins to automate the building of Docker images and the deployment of Docker containers. By the end of this book, you will be well prepared when it comes to using Docker for your next project.
Table of Contents (10 chapters)

Free networking features

There are two networking features or services that you get for free with your Docker swarm networks. The first is Service Discovery, and the second is load balancing. When you create Docker services, you get these features automatically. We experienced these features in this chapter and in Chapter 5, Docker Swarm, but didn't really refer to them by name. So, let's call them out here.

First up is Service Discovery. When you create a service, it gets a unique name. That name gets registered with the swarm DNS. And, every service uses the swarm DNS for name resolution. Here is an example for you. We are going to leverage the specifics-over overlay network we created earlier in the creating Docker networks section. We'll create two services (tester1 and tester2) attached to that network, then we will connect to a container in the tester1 services...