A Brief Information About Docker

Yiğitcan Nalcı
Quick Code
Published in
4 min readMar 2, 2020

--

If you are working in a software related area 💻, you may have heard about Docker lately. With Docker, you can run Linux and Windows virtual containers (machines) on Linux, Windows and MacOSX. With this platform, you can easily install, test and deploy web systems. Perhaps the most important feature was “It was working on my computer, why didn’t it work on the server?” is eliminating the problem.

In this post, I will explain Docker in 4 sections.

  • What is Docker?
  • Main Components of Docker
  • Installing Docker
  • Docker Commands
Photo by chuttersnap on Unsplash

What is Docker?

Docker is an open source virtualization platform developed for software developers and systematics. Docker provides a convenient environment to build, package and run applications, anywhere.

It’s good to hear that “anywhere”, right? 😄

Photo by Guillaume Bolduc on Unsplash

But, how does Docker do that? 😲

  • Of course with containers.

Docker uses containers for your application, so you don’t need to worry about environment you’re working on.

Containers vs Virtual Machines on Docker.com

Unlike virtualization of servers and a virtual machine, the container does not integrate the Operating System, it communicates directly with the operating system of the server on which it’s deployed.

Main Components of Docker

Docker Engine is a client-server based application and has a few main components. These components are listed below:

Docker Engine on Docker.com
  • The Server is a daemon process (Docker Daemon, the dockerd command) which is responsible for creating and managing Docker Images, Containers, Networks and Volumes.
  • The REST API provides the communication between applications and the Server and instruct it to get their job done.
  • The Client is a command line interface (CLI), which allows users to interact with Docker using the commands.
Docker Architecture on Docker.com

I found an explanation about Docker architecture on Docker.com. I copied and pasted below directly, because it is such a good explanation. You can read this explanation below and you can also click for further information about it.

Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface.

Installing Docker

Before we get started to use Docker, we must install it on our machine. 😎 For this, you can click the links below related to your OS.

After the installation is done, you can do everything you want using Docker. SHOW NO MERCY 😡.

Docker Commands

In this stage, I will describe base commands of Docker shortly 🐑. I don’t give any snapshots of these commands. You can find detailed descriptions of these commands on many sites.

Photo by Mael BALLAND on Unsplash
  • docker create : We can create a new container.
  • docker ps : This command allows us to list all running containers on the Docker Host.
  • docker start : We can start any stopped container.
  • docker stop : We can stop any started container with the first few unique characters like docker start command.
  • docker run : This command is combination of docker create and docker start commands. It creates a container and then it starts the container.
  • docker rm : If we want to delete a container, we can use it.
  • docker images : This commands lists all images which present on the Docker Host.
  • docker rmi : We can delete an image with this command.

You can click this link for further information about Docker commands.

Conclusion

If you want to run your applications anywhere without considering environment you are working on, you should give Docker a chance.

This article contains brief information about Docker that every developer should know. Then, I will explain how to dockerize a Spring Boot application. 😃

Thank you for reading! 🙏 Your thoughts are very valuable to me. Please feel free to share. 😄

--

--

Yiğitcan Nalcı
Quick Code

Dad. Software Engineer. Sports lover, doer. Curious about science and technology. Novice writer for now. https://www.linkedin.com/in/yigitcannalci