Containerizing a Software Application with Docker

Containers are helping to revolutionize the way we deliver software applications. This course will provide you with the requisite skills and knowledge to get you started with packaging your own software applications into containers.
Course info
Rating
(58)
Level
Intermediate
Updated
Aug 25, 2017
Duration
2h 20m
Table of contents
Course Overview
The Purpose of Docker Images
Committing Containers to Images
Building Docker Images
Authoring Docker Images with Dockerfiles
Authoring a Nginx Docker Image
Tagging and Pushing Docker Images
Description
Course info
Rating
(58)
Level
Intermediate
Updated
Aug 25, 2017
Duration
2h 20m
Description

With the advent of the microservices architecture pattern and enabling technologies such as containers, the way applications are being architected and delivered is changing. Packaging software applications into read-only template images in order to derive immutable application containers, is a key ingredient in this approach, and Docker is at the forefront. In this course, Containerizing a Software Application with Docker, you'll learn how to package a software application into a Docker image. First, you'll explore the nature of Docker images, and their relationship with containers. Next, you'll master how to create Docker images, including authoring a Docker image for a real software application using a Dockerfile. Finally, you'll discover how to name and share Docker images with a wider audience. By the end of this course, you'll have gained the required knowledge of techniques and best practice to get started with containerizing your own software applications.

About the author
About the author

Nigel is an IT professional with over 25 years of experience, gained in technical and management roles, including as CEO of a technical consulting organization. He has recently returned to his technical roots, and provide tuition in the domain of microservices and container technologies.

More from the author
Securing the Docker Platform
Beginner
4h 6m
21 Jun 2018
Securing Docker Container Workloads
Intermediate
3h 13m
22 Jan 2018
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone, my name is Nigel Brown, and welcome to my course, Containerizing a Software Application with Docker. I'm an independent consultant and trainer, with more than a few years of getting my hands dirty. My current obsession is the evolving world of containers and software application delivery. Containers and the Docker platform in particular are helping to revolutionize the way we deliver software applications. Organizations large and small across the globe are adopting a microservices-based container-driven approach to software delivery. In this course using best practice, you're going to learn how to package a software application into a container template, the Docker image. Some of the major topics that we'll cover include the anatomy of a Docker image, and how it relates to image size, techniques for building Docker images, including multistage builds, authoring an image for a software application using the declarative Docker file, and naming and sharing Docker images for wider consumption by users or automation tools. We can't turn you into a ninja Docker author over night, but when you're done with the course, you'll have sufficient knowledge and understanding to get started with containerizing your own software applications with Docker. Ideally before beginning the course, you should be familiar with the basic concepts of container virtualization. If you are just starting on the journey from traditional application packaging to a more modern distributed approach, then join me to discover how to containerize a software application with Docker.

Committing Containers to Images
Hi, and welcome back to our course entitled Containerizing a Software Application with Docker. My name's Nigel Brown. In the last module, we had a brief introduction to Docker containers and the techniques for creating Docker images. For anyone seeking to take advantage of the benefits of containerization, the Docker image is an essential ingredient for container workflows and defines how our software applications run inside containers. In this next module called Committing Containers to Images, we're going to start to explore how to create those images. More specifically, we'll look at the process involved in creating images by committing a container's filesystem. We'll also see how it's possible to build up an image for a software application by iterating over a series of steps. The decisions we make when we use this iterative process have a bearing on the structure of the image we create, and so we'll explore the anatomy of a Docker image, and how it relates to a container's filesystem. We'll go on to see how the layers of content associated with Docker images affect the ultimate size of the image we create. Finally, we'll look at how we can mitigate large-image sizes using this iterative process by taking steps to flatten Docker images. At the end of this module, you'll have enough knowledge to create rudimentary Docker images, and an understanding of the anatomy of images, which you'll need as we progressed authoring images for software applications.

Building Docker Images
Hello, my name is Nigel Brown. Welcome back to the next module of our course, Containerizing a Software Application with Docker. In the previous module, we learned how to create Docker images by making changes to a container's filesystem before committing the container to a new Docker image. We also saw that this technique has some shortcomings, and that it's difficult to control the size of those images whilst retaining the image history for ease of maintenance and development. In this next module, we're moving on to discuss the authorship of images using Dockerfiles, and the Docker image build command. The module is called Building Docker Images. Let's take a look at what we're going to cover. Our first topic will be the image build process itself. We'll define the ingredients required for building images, and analyze what happens when a build is instigated. One of the inputs to a build is the build context, which can be provided from a variety of different sources. We'll cover those build context sources. The main ingredient of an image build is the Dockerfile, and we'll provide a gentle introduction to the Dockerfile before we cover this in more detail in future modules. To wrap up the module, we'll discuss and demonstrate the use of the build cache, which is an important tool in the process of building Docker images. When we get to the end of the module, we'll have a good understanding of the overall process involved in building images, which will provide a foundation for the upcoming modules.

Authoring a Nginx Docker Image
Hello, I'm Nigel Brown, and you're watching a course entitled Containerizing a Software Application with Docker. Throughout all of the proceeding modules, we've learned a lot about the nature of Docker images and the mechanics associated with building them. In this next module, which is called Authoring an Nginx Docker Image, we're going to put that knowledge to use. We're going to build a software application from its source before we use the created binary as the image's executable process. Of course the planning and authoring of the image could apply equally well for any software application you might have in mind to containerize. Let's see what we're going to cover in this module. Making sure we get an image that's fit for purpose requires some forward thinking, so we'll need to plan the content of our image before we embark on authoring an appropriate Dockerfile. We'll spend some time piecing together the Dockerfile for our image, instruction by instruction, implementing best practice as we go. We'll also build and test the image once we finish defining the Dockerfile. After we've successfully built and tested the image, we'll assess whether we've achieved the best result we can. We'll move on to look at the concept of and benefits associated with multistage builds. Finally, we'll apply the multistage build approach to our scenario, show how we can improve on our first image build. Let's get started.