So you have heard about Docker or Kubernetes but you have not really used them or do not know how they work. In this series, we will be exploring these tools and their features individually based on practical examples and projects.

The first part of this series will give you practical insight into Docker by understanding what containers and images are and how they work. We will learn how to interact with containers, and create our own custom image using a Dockerfile. We will also examine and understand the process that Docker follows to build the image.

What is Docker?

First released in 2013, Docker revolutionized container technology by providing a cohesive toolset for developing, shipping, and running any application via containers. Docker is a Client-Server application consisting of three main components:

1- Docker command-line tool (CLI): The client. It interacts with Docker daemon through scripting or direct CLI commands. Docker CLI is one of many clients that are able to communicate with Docker Daemon.

2- Rest API: The interface through which to communicate with Docker Daemon.

3- Docker daemon (dockerd): The server which manages containers, images, volumes, networks, and more. The deamon also accesses the Registry which is a storage for public/or private Docker images.

Image for post

Installing Docker Engine

Easy peasy! Just follow these steps and download the whole deal in no time.

Containers and Images

The container and image are two key Docker objects that we are going to look at. A container is a loosely isolated environment in which an application is run. I say “loosely” because containers can be made to communicate with other containers or simply emit their output directly to your terminals. The isolation and security allow you to run many containers simultaneously on a given host, directly within the Linux Kernel without the overhead of a hypervisor.

A running container is a set of isolated processes that started using a Docker image. The term “isolated”, central to the idea of containers, is achieved through the following two approaches:

  • Namespacing: Isolates one or more processes to restrict access to hard-drive, network, users, hostnames, interprocess communication, or other processes.
  • Control Groups: Limits the amount of resource bandwidth such as memory, CPU usage, HD I/O or network used by a single process.

#docker #containerization #software-development #dockerfiles

Docker And Kubernetes Guide Pt. 1; Docker Container Basics
1.25 GEEK