Synergim

Docker

Updated July 2024

Docker
Docker a term which we hear quite often these days. Many of us are quite familiar with it and some of us wonder what is these about. In today’s technological world, developing an application requires lots of additional things apart from writing code. Multiple languages, frameworks, architectures, and discontinuous interfaces between tools for each lifecycle stage creates enormous complexity.
 
 Docker provides the ability to package and run an application in a loosely isolated environment called a container. Docker Container is a standardized unit which can be created on the fly to deploy a particular application or environment. It could be an Ubuntu container, CentOS container, etc. to full-fill the requirement from an operating system point of view.When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects
 
Images
 
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. You might create your own images, or you might only use those created by others and published in a registry.
 

Dockerfile

 To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.
 

 Containers

A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.

By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container’s network, storage, or other underlying subsystems are from other containers or from the host machine.A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that are not stored in persistent storage disappear.
 

 Docker registries

A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker is configured to look for images on Docker Hub by default. You can even run your own private registry.

When you use the docker pull or docker run commands, the required images are pulled from your configured registry. When you use the docker push command, your image is pushed to your configured registry.
 

 What can I use Docker for? 

  • Faster and consistent delivery of your applications.

  • Docker is light weight, portable and self-contained. Hence it is ideal for deploying microservices.

  • More efficient use of system resources as multiple containers can run on same hardware.

  • Great for continuous integration/continuous delivery (CI/CD)workflows.

 
Docker installation
Docker Hello world
References:

Explore More

5 1 vote
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x