Docker Certified Associate [DCA]: Step-by-Step Activity Guide (Hands-on Lab)

Kubernetes

Share Post Now :

HOW TO GET HIGH PAYING JOBS IN AWS CLOUD

Even as a beginner with NO Experience Coding Language

Explore Free course Now

Table of Contents

Loading

This blog post gives a walkthrough of the Step-By-Step Activity Guides of the Docker Certified Associate (DCA) Certification training program that you must perform to learn this course.

This post covers Hands-On Activity Guides that you must perform in order to learn Docker & Docker Swarm and clear the DCA certification exam.

Here is the list of our activity guides:

1) Register for AWS Free Tier Account And log into AWS Console
2) Creating & Connect to Ubuntu EC2 Instance
3) Docker Setup and installation on Ubuntu server
4) Working with Container
5) Working with Docker Image
6) Create an account on Dockerhub
7) Docker Networking (Bridge, Custom Bridge, Host Network)
8) Docker Storage (Host Path Mounting, Docker Volume, tmpfs mount)
9) Docker Private Registry
10) Working and Writing Dockerfile to create image
11) Working with Application Stack
12) Configuring External DNS, Logging, and Storage Driver
13) Working with Multi-stage Dockerfile
14) Docker Swarm Pre-requisites & Cluster Setup
15) Docker Service
16) Docker Service Placements and Constraints
17) Docker Secret
18) Docker Config
19) Docker Universal Control Plane (UCP)
20) Docker Swarm Maintenance
21) Bootstrap Kubernetes Cluster Using Kubeadm
22) Deploy an App on Pod & Basic Networking

Note: Know everything about the Docker Certified Associate Certification, and if it is right for you.

Docker Certified Associate Roadmap

(click to enlarge)

Activity Guide 1: Register For AWS Free Trial Account

To practice docker, the first thing you must do is to get a Trial Account for AWS cloud. (You get 12 months of Free Tier account to new subscribers to get hands-on experience with all the AWS cloud FREE services)

Here, we will look at how to register to create AWS FREE Trial Account, click here.

AWS free tier for Docker Certified Associate

2: VM Creation Walkthrough

After creating an AWS FREE trial account you need to create a new Ubuntu machine on the cloud to practice docker. On this machine, we will install docker and will perform all the commands on this machine.

Ubuntu EC2 Instance

Check out: Complete Guide on CKA Certification Exam

3: Docker Installation 

Docker is a free and open platform for building, shipping, and running apps inside the containers. Docker allows you to easily deliver apps. You can handle your infrastructure the same way you manage your applications with Docker.

Docker is available for download and installation on Windows Os, Linux, and macOS.

To know how to install docker on your machine read our blog on Docker Installation.

Docker Installation

4: Working with Docker Container

A Docker container is a version of an image that can be run. The Docker API and CLI can be used to build, start, stop, pause, and remove containers. You can mount storage to a container, link it to one or more networks, and even generate a new picture based on its current state.

In this Activity guide, we cover how to create/delete a container, the lifecycle of the container, Inspect container details, Listing containers, how to exec into a container.

Read our blog to get an idea of the Docker container.

Docker Container

Know more: about Container Orchestration and Management Options

Attention: Image Creation, Management, and Registry has the maximum weightage in the Docker Certified Associate exam. That is 20% of the total questions come from this section.

5: Working With Docker Images

Docker images are the template that is used to create a docker container. Images are read-only templates with instructions for creating a Docker container. Docker image is a file, comprised of multiple layers, that is used to execute code in a Docker container.

In this Activity guide, we cover how to Create/Push an Image, how to Tag images, Inspect Image details, Listing out Images, Delete Images from Local repo.

Read our blog to get an idea of Docker Image

Docker installation

6: Create an account on Dockerhub

Docker Hub is a cloud-based repository in which Docker users and partners store and distribute container images. Through Docker Hub, we can access public, open-source image repositories, as well as use space to create their own private repositories.

In this Activity guide, we cover how to create a Dockerhub account and create a public repository to store our images.

Docker Hub for Docker Certified Associate

7: Docker Networking (Bridge, Custom Bridge, Host Network)

Networking in Docker is to connect the docker container to each other and the outside world so they can communicate with each other also can talk to Docker Host. The Docker bridge driver automatically installs rules in the host machine so that containers on different bridge networks cannot communicate directly with each other. When a container is in host network mode, it takes out any network isolation between the docker host and the docker containers, and it does not receive its own IP address. For example, if you use host networking and run a container that binds to port 80, the container’s application is available on port 80 on the host’s IP address.

In this Activity guide, we cover the Inspect Bridge type network, Start/Stop container on default Bridge network, check network connectivity, Create Bridge type Custom network, Create containers, and connect to custom-bridge.

Read our blog to know more about Docker Network

Docker Host

8: Docker Storage (Host Path Mounting, Docker Volume, tmpfs mount)

Containers are non-persistent storage when we stop a container we lose all the data to overcome this issue we need to use persistence storage so we can store data persistently. In docker we have 2 ways to store data persistently 1) Docker Volume 2) Bind Mounts. When you use a bind mount type storage a file or directory on the docker host machine is mounted into a container. Bind mounts are very good performance type storage, but they rely on the host machine’s filesystem having a specific directory structure available.

In this Activity guide, we cover Create docker volume, Create a file in mounted volume path, Create a container and mount the host path to the container, Customise the web page mounted to local filesystem.

Read our blog to know more about Docker Storage

Working With Docker Volume

9: Docker Private Registry

A private Docker registry allows you to share your custom base images within your organization, keeping a consistent, private, and centralized source of truth for the building blocks of your architecture.

In this Activity guide, we cover Create local storage to store docker images, push image to Private Registry.

10: Configuring External DNS, Logging and Storage Driver

By default, a container inherits the DNS settings of the host Containers that use the default bridge network to get a copy of this file, whereas containers that use a custom network use Docker’s embedded DNS server, which forwards external DNS lookups to the DNS servers configured on the host.

In this Activity guide, we cover Verify the resolv.conf file content, Create/Update daemon.json to use external DNS for all containers, Restart Docker service, Start container with specific Logging driver, Verify present Storage driver configured.

Also checkout: Comparison between Docker vs VM, the difference of both the machines you should know.

11: Working with Dockerfile to create the image

Docker can read instructions from a Dockerfile and generate images for you automatically. A Dockerfile is a text file that contains all of the commands that a user may use to assemble an image from the command line. Users can use docker build to automate a build that executes multiple command-line instructions in a row.

In this Activity guide, we cover how to write dockerfile instructions to create a docker image, how to build an image, how to use the different options in dockerfile, reducing image size using Multi-stage build, Onbuild dockerfile.

Read more about Dockerfile

Docker Image

12: Working With Application Stack

When running Docker Engine in swarm mode, we can use a docker stack to deploy a complete application stack to the swarm.

Dockerfile is a document that contains all the commands a user could call on the command line to assemble an image. The docker build command builds an image from a Dockerfile.

In this Activity guide, we cover installing docker-compose, Build and run the application with docker-compose, Edit Compose file to add a bind mount.

Docker Compose

Read our blog to know more about Docker Compose

13: Working with Multi-stage Dockerfile

When we create a dockerfile the size of the dockerfile is very big to reduce the size of that dockerfile we need to use the Multi-stage Dockerfile using this we can reduce the size of the dockerfile.

At this point in our training program, you will be well versed with Docker commands. And only a few steps away from becoming a Docker Certified Associate.

14: Docker Swarm Pre-requisites & Cluster Setup

A Swarm cluster is a set of node machines for running containerized applications. At the highest level of Swarm cluster, there exist two kinds of servers, a Master and a Worker node.

In this activity guide, we cover how to bootstrap a Swarm cluster .

Docker Compose for Docker Certified Associate

15: Docker Service

To deploy an application image when Docker engine is in swarm mode, we can create a service. Frequently a service is an image for a microservice within the context of some larger application. Examples of services might include an HTTP server, a database, or any other type of executable program that you wish to run in a distributed environment.

In this Activity guide, we cover Create a service, List services, Display detailed, information of services, Fetch the logs of a service, Scale-up and down services, Update a service, Rollback a service, Remove service

Docker Service

16: Docker Service Placements and Constraints

Swarm services provide a few different ways for you to control scale and placement of services on different nodes. Placement constraints let you configure the service to run only on nodes with specific (arbitrary) metadata set, and cause the deployment to fail if appropriate nodes do not exist.

In this Activity guide, we cover Add node labels, Create service with placement constraints, Remove labels

Docker Service Placement and Constraints

17: Docker Secret

In terms of Docker Swarm services, a secret is a blob of data, such as a password, SSH private key, SSL certificate, or another piece of data that should not be transmitted over a network or stored unencrypted in a Dockerfile or in your application’s source code.

In this Activity guide, we cover Create Secret object, List Secret, Create service using Secret object, Remove Secret

Docker Secret

18: Docker Config

Docker swarm service configs allow you to store non-sensitive information, such as configuration files, outside a service’s image or running containers. This allows you to keep your images as generic as possible, without the need to bind-mount configuration files into the containers or use environment variables.

In this Activity guide, we cover Create Config object, List Config, Create service using config object, Remove Config

19: Docker Universal Control Plane (UCP)

Docker Universal Control Plane (UCP) is the enterprise-grade cluster management solution from Docker. You install it on-premises or in your virtual private cloud, and it helps you manage your Docker swarm and applications through a single interface.

In this Activity guide, we cover Install UCP, Explore UCP

Docker Universal Control Plane

20: Docker Swarm Maintenance

In this Activity guide, we cover Promote a node to master role, Demote a node from master role, Drain a node, Remove a node from swarm

21: Bootstrap Kubernetes Cluster Using Kubeadm

Kubernetes cluster is a set of node machines for running containerized applications. At the highest level of Kubernetes, there exist two kinds of servers, a Master and a Worker node. These servers can be Virtual Machine(VM) or physical servers(Bare metal). Together, these servers form a Kubernetes cluster and are controlled by the services that make up the Control Plane.

In this activity guide, we cover how to bootstrap a Kubernetes cluster using Kubeadm, Installing kubeadm & kubectl packages, create cluster and join worker node to master, Install CNI plugin for networking.

To know how to install the Kubernetes cluster on your machine read our blog on Kubernetes Installation.

Bootstrap Kubernetes Cluster Using Kubeadm

22: Deploy an App on Pod & Basic Networking

In Kubernetes, most service-style applications use Deployments to run applications on Kubernetes. Using Deployments, you can describe how to run your application container as a Pod in Kubernetes. Kubernetes networking allows Kubernetes components like Pods, containers, API server, etc. to communicate with each other.

In this activity guide, we cover deploying NGINX server as a pod, running NGINX server as scalable deployment, Running Nginx Server as Pod inside the Cluster, Exposing Nginx within Cluster Using ClusterIP, Exposing Nginx outside Cluster Using NodePort.

Picture of mike

mike

I started my IT career in 2000 as an Oracle DBA/Apps DBA. The first few years were tough (<$100/month), with very little growth. In 2004, I moved to the UK. After working really hard, I landed a job that paid me £2700 per month. In February 2005, I saw a job that was £450 per day, which was nearly 4 times of my then salary.