Docker Terminologies

Meghal Chhabria
3 min readDec 10, 2020

--

Hi , I hope you are doing well.

Please read my first article on “Hello World Docker” in below link to follow along.

Link for Hello World in Docker article

So let’s start the second article on my docker series. :)

Terminologies , what is it?

All the geeky words used while working on a technology are called as terminologies. It synchronizes the meaning of a term amongst community.

Some terminologies used in docker are:

  1. Docker Daemon
  2. Docker client
  3. Images
  4. Containers
  5. Networks
  6. Volumes

Let’s dive.

*** Countdown ***

  1. Docker Daemon → It is a service or the process that runs on the host system , in my case it’s ubuntu. Docker Daemon does all the heavy-lifting for creating containers, communicating with underline host. It also creates and manages all the docker objects. i.e. images, containers, volumes.
  2. Docker Client → It is the interface which communicates with the daemon , for example bash in ubuntu which talks to daemon. It can be remote or locally available. In my case, docker host is i.e. ubuntu is hosting both docker daemon and docker client.
  3. Images → Assume it to be a group of files which is necessary to run your application. For example: An image of windows OS which we use to bring up Windows. The image consists of all the files which helps the application to work properly.

Remember, in the last article we used “docker run hello-world” , here hello- world is the image.

Question arises !!!

Where is this image?

Logon to Dockerhub, search for hello-world. BOOOOM!

Search Results for hello-world on Dockerhub.

here hello-world is an image which was pulled from this repository/registry.

As an enterprise, you would need to host this registry as well.

As a developer, you can use this as default registry.

There are tons of docker images available which you can use for your application.

4. Containers → It is basically the running instance of your docker image. Once you have bundled your application as an image, you can run that image and that running instance is a container. It can also be represented as an isolated instance of your application.

All the pre-requisites required to run your application are bundled as part of image.

Docker images have no significance unless it runs as a container :)

5. Networks → The USP , ahem ahem :D, it is so flawless that even containers are not aware they are running on a host OS. Dockers provides support of networking through network drivers. By default docker container uses bridge networks.

To check that you can simple run this command,

# docker network ls
NETWORK ID NAME DRIVER SCOPE
7e550784d01d bridge bridge local
ae348092e03a host host local
c49dd5936bec none null local

To inspect your network, simply hit this command,

# docker network inspect bridge
[
{
“Name”: “bridge”,
“Id”: “7e550784d01d7da9c9c3d2bdf758368477bf8dbad53842050a22a89da01da0ac”,
“Created”: “2020–12–10T23:04:01.9382682+05:30”,
“Scope”: “local”,
“Driver”: “bridge”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: [
{
“Subnet”: “172.17.0.0/16”,
“Gateway”: “172.17.0.1
}
]
},
“Internal”: false,
“Attachable”: false,
“Ingress”: false,
“ConfigFrom”: {
“Network”: “”
},
“ConfigOnly”: false,
“Containers”: {},
“Options”: {
“com.docker.network.bridge.default_bridge”: “true”,
“com.docker.network.bridge.enable_icc”: “true”,
“com.docker.network.bridge.enable_ip_masquerade”: “true”,
“com.docker.network.bridge.host_binding_ipv4”: “0.0.0.0”,
“com.docker.network.bridge.name”: “docker0”,
“com.docker.network.driver.mtu”: “1500”
},
“Labels”: {}
}
]

6. Volumes → It is a preferred mechanism for persistence storage in docker container meaning permanent storage in container. Volumes are independent of host machine and are controlled under the specific container. These volumes has several advantages such as these volumes will remain same on Linux and on windows, these volumes can be shared across containers on the daemon.

To create volumes, simply hit this command

$ docker volume create new-vol

These are created outside the scope of container, to check if the volume mount got created run the below command:

$ docker volume ls
DRIVER VOLUME NAME
local new-vol

To inspect this volume, simply hit this command,

$ docker inspect new-vol
[
{
“CreatedAt”: “2020–12–10T23:23:57+05:30”,
“Driver”: “local”,
“Labels”: {},
“Mountpoint”: “/var/lib/docker/volumes/new-vol/_data”,
“Name”: “new-vol”,
“Options”: {},
“Scope”: “local”
}
]
$ ls -lrt /var/lib/docker/volumes/
drwxr-xr-x 3 root root 4096 Dec 10 23:23 new-vol

Please take a minute to appreciate your efforts. You made it. Learnt something new. :) Congratulations

Follow me on linkedin,

Cheers :D

Thanks for reading 👍🏻

--

--