CodeNewbie Community 🌱

Cover image for Dockerizing your Docker with Docker
Delia Ayoko
Delia Ayoko

Posted on

Dockerizing your Docker with Docker

Docker was founded by Solomon Hykes in 2010 and was launched in 2011, using the Go programming language. The reason behind its creation was due to the fact that developers kept asking for the underlying technology powering the DotCloud platform, now known as Docker Inc.

What is Docker?

The Oxford dictionary explains the word "docker" as a person employed in a port to load and unload ships. Note that according to Oxford, a docker is a person that can perform many activities; loading and unloading.

That said, Docker is a set of Paas(Platform as a Service) products that uses OS-level virtualization to deliver software in packages called containers. In simpler terms, Docker is a software platform that simplifies the process of building, running, managing and distributing applications.

Docker Operations

Containers bundled up by docker are hosted by a software called the docker engine. Docker can bundle an application and its dependencies in a virtual container that can be executed on a Linux, Windows or macOS computer. The application can then run in a variety of locations like on-premises(like IBM private cloud), in public cloud(like AWS) or private cloud(like OpenStack). Docker uses the resource isolation features of the Linux kernel when running on Linux, and a union-capable file system like OverlayFS to permit containers run within a single Linux instance, avoiding the expenses of starting and maintaining virtual machines. On macOS, Docker uses a Linux virtual machine to run these containers. A single virtual machine can run several containers simultaneously, due to weightlessness of Docker containers.
Docker implements a high-level API(the Docker Engine API) to provide lightweight containers that run processes in isolation.

Docker consists of three components:

  1. Software: Docker software can be split into the daemon and the client program.
    The Docker daemon, called "dockerd" is a continuous process that handles Docker containers and controls container objects. It listens for requests sent through the Docker API. The "docker" which is the client program, provides users with a command line that permits them to interact with daemons.

  2. Objects: They are units used to assemble an application in Docker. Its main classes are images, containers and services.

    • A Docker image is a read-only template used to build containers, to store and to ship applications.
    • A Docker container is a standardized encapsulated environment that runs applications. It is managed using the Docker API or CLI.
    • A Docker service is a group of containers of the same image that enables the scaling of applications. It allows containers to be sealed across multiple daemons, which results in a swarm.
  3. Registries: A Docker registry can be visualized as a repository for Docker images, where clients connect to pull images for use, or to push the ones they have built. Like Github repos, Docker registries can either be public or private. Docker Hub and Docker Cloud are two main public registries on Docker. Registries also allow for the creation of notifications based on events.

Summarily,

Imagine your 5 year old Emma saw you reading this article and asked you to explain what Docker is. What would you say? That Docker is a software used to ship containers? Of course not. What if she didn't know what a software was? Notice the puzzle on her face when you tell her that. You have to explain it like a real life situation.

Last week Thursday, I was so busy that I wish I'd passed out. I had to cook breakfast for you and your dad, clean the dishes, dropped you at school and arrived work very late. After my seminars at work, I went shopping and picked you up after school. I cooked lunch and I went to visit a colleague who was not feeling very well. I came back, helped you out with your assignments and cooked dinner. After dinner, I wrote a report for my boss the next day. Then I read you a bedtime story and tucked you in bed. Funniest thing was, I slept for only two hours the night before. Now, if I gave you a red magic cloak to tie around your neck for you to help me with all those things while I laid back with a cup of coffee behind my desk, I would call you Super Emma. That's what Docker is.

Top comments (0)