19 Jun 2020, 10:19pm TZ +05:30
We would be looking at the process of installing, configuring and testing docker based containerization technology.
Though one might find it easy to install docker, there are subtle nuances that one needs to watchout for.
1. Install docker
Manjaro (Arch Linux) maintains the latest version of most software packages. Just make sure you have good internet connection.
Hence without worry execute the following:
This should install the latest version of docker.
Let’s verify if we have things installed correctly:
Errors tell a story
Oh! Whats that last message ?
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
This might be a bit mispleading.
It’s the service daemon telling us
containerd has not started.
containerdis available as a daemon for Linux and Windows. It manages the complete container lifecycle of its host system, from image transfer and storage to container execution and supervision to low-level storage to network attachments and beyond.
Source : containerd
Technical jargon apart this is what allows docker to do Containerization.
Hence its quite important that it’s working.
Let’s look at this in the net section.
For more information of
2. Starting the docker Service
We looked at the mystical error in the
Let’s now figure out how to fix this.
One of nice things about Manjaro (Arch Linux) is that
it does not enable all service by default.
This kind of makes your system fast to boot and use.
Success with docker version command
We have the things running correctly.
Since now we can also see
Why Server and Client ?
docker command is like a front-end or Client and
containerd is a back-end or server.
2.a What if we wanted to start the docker service automatically ?
That is possible. But I would consider it detrimental to Arch way of things.
$USER for docker
As you might have noticed, we are using
docker commands as well.
sudo for system commands like
systemctl is alright.
But, for development it becomes a mess.
Let’s fix that by adding our user to the
docker user group.
This would allow us to use the
docker command without
Note: After modifying the current user using above - One must restart the computer.
This time without the additional
4. See if docker is working and
Well enough talk about versions and services. Let’s see if our precious install actually does some things.
The programming essential is called
We do have an Docker Image by that name. Let’s run it.
Note: To run the below commands you must have internet connected.
This was an output from running a container of the image
If you see this output your docker is Seaworthy captain!.
We have used a lot of jargon again. Let’s decode that in the next section.
5. Understanding the Anatomy of a container
A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.
Source : Docker website
What about images ?
Container images become containers at runtime and in the case of Docker containers - images become containers when they run on Docker Engine.
Source : Docker Website
Well that was convoluted !
To simply put - images are the source material for creating containers. They contain all the necessary information and configuration in one unit.
We can create multiple containers from the same image.
Each container will have unique operation context or execution environment. Even though they might be created from the same image.
For more insight visit: https://www.docker.com/resources/what-container
6. This is only the beginning of our Adventure with
Indeed, there are lot of applications and interesting ideas around Containerization. Docker has made our entry to this world much simpler.
I look forward to publishing more works related to docker.
As always, I look forward to your suggestion and comments. DM me on Twitter