K8S.INSTITUTE Learn and Master Kubernetes

Discover our courses

Docker for Beginners

Aim :

This course is designed for complete beginners to start with Containerization using docker. According to the latest research by 2022 more than 75% of IT organizations will adopt containerization. We believe the best way to learn Docker is by interacting with docker rather than just reading or watching video tutorials so this course will help you understand how docker gets installed on Linux virtual machine locally as well as in AWS Cloud. We will start with setting up our local learning environment using Vagrant, VirtualBox, Linux and Docker. Once all delegates are comfortable with the core concept around containerization, we will demonstrate installation and configuration of Docker on EC2 instance in AWS and set up a web application using Docker in the cloud and access it from the end user system.

Prerequisites :

1. Delegates must be fluent and efficient dealing with Linux / Power shell command line interface.
2. Minimum 6 - 12 months of:

- Software development experience in any programming language OR
- Working knowledge of Linux systems administration OR
- Working knowledge of Network Administration OR
- Software testing experience. OR
- Degree or Diploma in computer or any relevant field.

Note:

- All labs and scenario based exercises will be performed through CLI.
- Every delegate will need to bring their own laptop.

Syllabus:

Virtualization :

- Overview (Virtualbox and Vagrant)
- Why virtualization is necessary in modern world
- Install Virtualbox and additional dependency
- Install Vagrant
- Spinup 1st virtual linux system (Centos/ubuntu).
- Become familiar with vagrant command line. (This helps to share box images with team members with required tools and utilities eg. docker)
- Prepare your first Vagrant configuration.

Comparison Virtualization vs Containerization(Very important to understand) :

Getting Started(We will work with Docker CE {Community Edition}) :

- Remove Docker available from base linux repo.
- Setup docker-ce repositories.
- Install docker-ce latest stable version.
- Start docker service ​systemctl start docker
- Enable docker using systemd service. ​systemctl enable docker Check version of docker.​ docker version
- Understand the difference between server and client components.
- Restart virtual-machine and confirm docker service keeps running.
- Getting familiar with terminology e.g image container registry​.

What is a docker image repository ?

- Understanding docker image concept.
- Learn about Docker-Hub (A free docker image repository)
- Understanding image tags.
- Pull a basic ​busybox​ and ​alpine​ image from dockerhub. ​docker pull
- List all images available local on your system. ​docker images
- Inspect a docker image to gain insight of the image. ​docker image inspect

What are containers?

- Basic understanding about containers.
- Start a container using the image we downloaded.
- Understand different command line options for docker run
- Brief introduction with other command line options for docker client.
- Investigate running container process.
- Gain shell access to the running container. ​docker exec
- Update your running container by installing a utility.
- Create docker image from running updated container.
- Tag newly created image. ​docker tag image_id tag
- Inspect layers of new image. You will see a new layer added.
- Create / Run a new container from a newly created image.
- Inspect low level docker objects using ​docker inspect container_name

Automate image creating with Dockerfile

- What is a Dockerfile.
- Learn basic commands required to prepare Dockerfile.
- RUN, COPY, EXPOSE, ENTRYPOINT, CMD etc
- Understanding difference between ENTRYPOINT and CMD
- Create a sample Dockerfile.
- Create a new docker image from Dockerfile.
- Verify newly created image.
- Run a container from new image and inspect validate Dockerfile changes..
- Execute various commands using docker exec

Prepare custom image with nginx web server.
(We will use both approaches we learned to achieve this)

- Build a custom web server image using nginx
- Multi Container environment with Docker Compose​.
- Docker compose (docker-compose) is an open source tool which allows us to define and run multiple containers together.
- Install docker-compose on our system where docker is installed.
- Useful for two tier application (not advisable in production with heavy loads)
- YAML (docker-compose) config files are written in yaml.
- .yaml or .yml (both extensions are valid)
- Create a directory called playground and create sample config.
- We will prepare a compose file to run wordpress (web and db)
- Validate containers.

Brief introduction to Docker Networking

Docker setup in AWS : (Free Tier)

- (Delegates will need a Free Tire account to follow this section)
- Log on to AWS management console.
- Create a EC2 instance (Free tier supported instance type)
- Follow the guide line from the instructor to install required docker packages on EC2 instance.
- Run a container with webserver image.
- Access the web server from the command line with curl.
- Access a web server from an external system.
- Run multi-container app (wordpress) from EC2.

Bonus topics: (Optional - {FREE})

- Introduction to​ ​Kubernetes for beginners
- We will install and configure 1 node kubernetes cluster.
- Brief overview of kubernetes master (Control Plane) Components.
- What is a POD?
- Prepare a definition file for POD
- How to run containerised service using pod.