Docker Certification course provides an end to end learning experience for core Docker technologies, including the Docker Hub, Docker Compose, Docker Swarm, Dockerfile, Docker Containers, Docker Engine, Docker Images, Docker Network, Docker Daemon and Docker Storage along with real life case studies.

Goal : Introduces Docker to readers, the core concepts and technology behind Docker. Learn in detail about container and various operations performed on it.

Objectives : Upon completing this lesson, you should be able to: Introduce Docker and state its benefit over VM, Get a brief idea about Architecture of Docker and various terminology associated with it, Run Hello World in Docker, Describe what is Container in Docker, why to use it, and its various scopes, Create, start, stop and remove containers, Share, copy, and backup your data running in a container.

Topics : Shipping Transportation Challenges, Introducing Docker, Architecture of Docker, Understanding images and containers, Running Hello World in Docker, Introduction to Container, Container Life Cycle, Sharing and Copying.

Hands on : Searching for images in docker repository, Pulling images from docker repository, Executing docker images pulled from repository, Create, Start, Stop and Remove Containers, Sharing Data in your Docker Host with Container, Sharing Data between the Container, Copying Data to and from Container.

Goal : This module introduces the Dockerfile and Docker Hub and shows how to build, tag or commit an image. Run your own Docker registry and set up automated builds. At the end of this module, learn how to create Docker images and share them privately or publicly.

Objectives : At the end of this lesson, you should be able to: Create images by starting a container using a base image and interactively make changes to it, Create a Dockerfile that will let Docker build the image automatically, Share your image using Docker Hub deploy your own Docker images registry and set up your own automated build, At the end of this module, write Dockerfiles for your various application services and share them through a hosted service like the Docker Hub or through your own Docker registry.

Topics : Base Image, Docker File, Working with containers, Optimization of Docker File, Publishing Image on Docker Hub, Private Registry.

Goal : This module introduces several tools that leverage Docker to ease application deployment, continuous integration, service discovery, and orchestration. As an example, you will find recipes about Docker Compose and Docker Swarm.

Objectives : Learn how to use Docker Compose to create a WordPress site, start containers on a Cluster with Docker Swarm and finally manage them locally using Kitematic UI and through Docker UI

A hypervisor is a software that makes virtualization possible. It is also called Virtual Machine Monitor. It divides the host system and allocates the resources to each divided virtual environment. You can basically have multiple OS on a single host system. There are two types of Hypervisors:

  • Type 1: It’s also called Native Hypervisor or Bare metal Hypervisor. It runs directly on the underlying host system. It has direct access to your host’s system hardware and hence does not require a base server operating system.
  • Type 2: This kind of hypervisor makes use of the underlying host operating system. It’s also called Hosted Hypervisor.

Virtualization is the process of creating a software-based, virtual version of something(compute storage, servers, application, etc.). These virtual versions or environments are created from a single physical hardware system. Virtualization lets you split one system into many different sections which act like separate, distinct individual systems. A software called Hypervisor makes this kind of splitting possible. The virtual environment created by the hypervisor is called Virtual Machine.

Let me explain this is with an example. Usually, in the software development process, code developed on one machine might not work perfectly fine on any other machine because of the dependencies. This problem was solved by the containerization concept. So basically, an application that is being developed and deployed is bundled and wrapped together with all its configuration files and dependencies. This bundle is called a container. Now when you wish to run the application on another system, the container is deployed which will give a bug-free environment as all the dependencies and libraries are wrapped together. Most famous containerization environments are Docker and Kubernetes.

Once you’ve explained containerization and virtualization, the next expected question would be differences. The question could either be differences between virtualization and containerization or differences between virtual machines and containers. Either way, this is how you respond.

Containers provide an isolated environment for running the application. The entire user space is explicitly dedicated to the application. Any changes made inside the container is never reflected on the host or even other containers running on the same host. Containers are an abstraction of the application layer. Each container is a different application.

Since its a Docker interview, there will be an obvious question about what is Docker. Start with a small definition.

Docker is a containerization platform which packages your application and all its dependencies together in the form of containers so as to ensure that your application works seamlessly in any environment, be it development, test or production. Docker containers, wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries, etc. It wraps basically anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

Docker containers include the application and all of its dependencies. It shares the kernel with other containers, running as isolated processes in user space on the host operating system. Docker containers are not tied to any specific infrastructure: they run on any computer, on any infrastructure, and in any cloud. Docker containers are basically runtime instances of Docker images.

When you mention Docker images, your very next question will be “what are Docker images”.

Docker image is the source of Docker container. In other words, Docker images are used to create containers. When a user runs a Docker image, an instance of a container is created. These docker images can be deployed to any Docker environment.

Docker images create docker containers. There has to be a registry where these docker images live. This registry is Docker Hub. Users can pick up images from Docker Hub and use them to create customized images and containers. Currently, the Docker Hub is the world’s largest public repository of image containers.

Docker Architecture consists of a Docker Engine which is a client-server application with three major components:

  1. A server which is a type of long-running program called a daemon process (the docker command).
  2. A REST API which specifies interfaces that programs can use to talk to the daemon and instruct it what to do.
  3. A command line interface (CLI) client (the docker command).
  4. The CLI uses the Docker REST API to control or interact with the Docker daemon through scripting or direct CLI commands. Many other Docker applications use the underlying API and CLI.

Refer to this blog, to read more about Docker Architecture.

Let’s start by giving a small explanation of Dockerfile and proceed by giving examples and commands to support your arguments.

Docker can build images automatically by reading the instructions from a file called Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build, users can create an automated build that executes several command-line instructions in succession.

The interviewer does not just expect definitions, hence explain how to use a Dockerfile which comes with experience. Have a look at this tutorial to understand how Dockerfile works.

Docker Compose is a YAML file which contains details about the services, networks, and volumes for setting up the Docker application. So, you can use Docker Compose to create separate containers, host them and get them to communicate with each other. Each container will expose a port for communicating with other containers.

You are expected to have worked with Docker Swarm as it’s an important concept of Docker.

Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual Docker host. Docker Swarm serves the standard Docker API, any tool that already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts.

A namespace is one of the Linux features and an important concept of containers. Namespace adds a layer of isolation in containers. Docker provides various namespaces in order to stay portable and not affect the underlying host system. Few namespace types supported by Docker – PID, Mount, IPC, User, Network

Goal : This module covers the configuration of the Docker daemon, especially security settings and remote access to the Docker API. You will learn a few basic problems, like compiling Docker from source, running its test suite, and using a new Docker binary. A few recipes provide better insight on Linux namespaces and their use in containers. Finally, you will know about the basics of networking.

Objectives : At the end of this lesson, you should be able to: Learn about the configuration of the Docker daemon, especially security settings and remote access to the Docker API, Learn how to change the underlying storage driver that provides a union filesystem to support Docker images, Learn the basics of Docker Networking.

Goal : Learn the networking mechanisms in Docker. Understand how to get containers’ IP addresses and how to expose a container service on a specific host port. Learn about linking containers, and how to use nondefault networking configurations. Concepts such as network namespaces, using an OVS bridge, and GRE tunnels are presented to lay a strong foundation for container networking. This module also presents you the recipes to show how to access a Docker host on Amazon AWS. The module also introduces to one of the new cloud service that use Docker: the AWS Elastic Container Service (ECS).

Docker Certification course will help you master the key concepts of Docker and how data can be containerized into a single or multiple containers, architecture of Docker, containerization and various operations performed on it. You will also learn about Docker Hub and ways to create a Docker Image. This course also introduces you to several tools that leverage Docker to ease application deployment, continuous integration, service discovery, and orchestration. Finally, learn to deploy various Container based Applications on the Cloud.

This is one of the most popular questions asked in Docker interviews. Docker containers have the following lifecycle:

  • Create a container
  • Run the container
  • Pause the container(optional)
  • Un-pause the container(optional)
  • Start the container
  • Stop the container
  • Restart the container
  • Kill the container
  • Destroy the container

Docker machine is a tool that lets you install Docker Engine on virtual hosts. These hosts can now be managed using the docker-machine commands. Docker machine also lets you provision Docker Swarm Clusters.

The following command gives you information about Docker Client and Server versions:

You can use the following command to get detailed information about the docker installed on your system.

$ docker info

The following command is very useful as it gives you help on how to use a command, the syntax, etc.

$ docker --help

The above command lists all Docker commands. If you need help with one specific command, you can use the following syntax:

$ docker <command> --help

You can use the following command to login into hub.docker.com:

$ docker login

You’ll be prompted for your username and password, insert those and congratulations, you’re logged in.

You pull an image from docker hub onto your local system

It’s one simple command to pull an image from docker hub:

$ docker pull <image_name>

Pull an image from docker repository with the above command and run it to create a container. Use the following command:

$ docker run -it -d <image_name>

Most probably the next question would be, what does the ‘-d’ flag mean in the command?

-d means the container needs to start in the detached mode. Explain a little about the detach mode. Have a look at this blog to get a better understanding of different docker commands.

The following command lists down all the running containers:

$ docker ps

The following command lets us access a running container:

$ docker exec -it <container id> bash

The exec command lets you get inside a container and work with it.

The following command is used to start a docker container:

$ docker start <container_id>

and the following for stopping a running container:

$ docker stop <container_id>

kill a container with the following command:

$ docker kill <container_id>

Of course, you can use a container, edit it and update it. This sounds complicated but its actually just one command.

$ docker commit <conatainer id> <username/imagename>