- Install on Arch-based distributions
- Prerequisites
- Install Docker Desktop
- Launch Docker Desktop
- Next steps
- Getting started with Docker on Manjaro (Arch Linux)
- 1. Install docker #
- Errors tell a story #
- Whats containerd ? #
- 2. Starting the docker Service #
- Success with docker version command #
- Why Server and Client ? #
- 2.a What if we wanted to start the docker service automatically ? #
- 3. Getting $USER for docker #
- 4. See if docker is working and hello-world #
- 5. Understanding the Anatomy of a container #
- What about images ? #
- 6. This is only the beginning of our Adventure with docker #
- How to Install Docker on Manjaro Linux
- Installation Guide:
- Step 1: Update your system
- Step 2: Install Docker
- Step 3: Start the Docker service
- Step 4: Enable the Docker service
- Step 5: Check Docker version
- Step 6: Check Docker info
- Step 7: Run Docker without root
- Step 8: Reboot the system
- Step 9: How to search for a Docker image
- Step 10: Install Docker image
- Step 11: Run a docker image
- Step 12: Monitor Docker
- Step 13: See installed Docker images
- Step 14: See statistics of running images
- Step 15: Docker’s network configuration
Install on Arch-based distributions
This topic discusses installation of Docker Desktop from an Arch package that Docker provides in addition to the supported platforms. Docker has not tested or verified the installation.
Prerequisites
To install Docker Desktop successfully, you must meet the system requirements.
Additionally, for non-Gnome Desktop environments, gnome-terminal must be installed:
$ sudo pacman -S gnome-terminal
Install Docker Desktop
- Install client binaries. Docker does not have an Arch package repository. Binaries not included in the package must be installed manually before installing Docker Desktop.
- Install Docker client binary on Linux. On Arch-based distributions, users must install the Docker client binary. Static binaries for the Docker client are available for Linux (as docker ).
- Download the Arch package from the release page.
- Install the package:
$ sudo pacman -U ./docker-desktop--arch>.pkg.tar.zst
Launch Docker Desktop
To start Docker Desktop for Linux, search Docker Desktop on the Applications menu and open it. This launches the Docker menu icon and opens the Docker Dashboard, reporting the status of Docker Desktop.
Alternatively, open a terminal and run:
$ systemctl --user start docker-desktop
When Docker Desktop starts, it creates a dedicated context that the Docker CLI can use as a target and sets it as the current context in use. This is to avoid a clash with a local Docker Engine that may be running on the Linux host and using the default context. On shutdown, Docker Desktop resets the current context to the previous one.
The Docker Desktop installer updates Docker Compose and the Docker CLI binaries on the host. It installs Docker Compose V2 and gives users the choice to link it as docker-compose from the Settings panel. Docker Desktop installs the new Docker CLI binary that includes cloud-integration capabilities in /usr/local/bin/com.docker.cli and creates a symlink to the classic Docker CLI at /usr/local/bin .
After you’ve successfully installed Docker Desktop, you can check the versions of these binaries by running the following commands:
$ docker compose version Docker Compose version v2.17.3 $ docker --version Docker version 23.0.5, build bc4487a $ docker version Client: Docker Engine - Community Cloud integration: v1.0.31 Version: 23.0.5 API version: 1.42
To enable Docker Desktop to start on login, from the Docker menu, select Settings > General > Start Docker Desktop when you log in.
Alternatively, open a terminal and run:
$ systemctl --user enable docker-desktop
To stop Docker Desktop, select the Docker menu icon to open the Docker menu and select Quit Docker Desktop.
Alternatively, open a terminal and run:
$ systemctl --user stop docker-desktop
Next steps
- Take a look at the Get started training modules to learn how to build an image and run it as a containerized application.
- Review the topics in Develop with Docker to learn how to build new applications using Docker.
Getting started with Docker on Manjaro (Arch Linux)
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:
# Install Docker main Package sudo pacman -Syyu docker .
This should install the latest version of docker.
Let’s verify if we have things installed correctly:
1 2 3 4 5 6 7 8 9 10 11 12
# To check the version of docker installed sudo docker version # Output Client: Version: 19.03.11-ce API version: 1.40 Go version: go1.14.3 Git commit: 42e35e61f3 Built: Tue Jun 2 15:09:26 2020 OS/Arch: linux/amd64 Experimental: false Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
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.
Whats containerd ? #
containerd is 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.
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 containerd :
2. Starting the docker Service #
We looked at the mystical error in the version command.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
# Start docker service sudo systemctl start docker . # Let's now run the version command sudo docker version # Here is new output Client: Version: 19.03.11-ce API version: 1.40 Go version: go1.14.3 Git commit: 42e35e61f3 Built: Tue Jun 2 15:09:26 2020 OS/Arch: linux/amd64 Experimental: false Server: Engine: Version: 19.03.11-ce API version: 1.40 (minimum version 1.12) Go version: go1.14.3 Git commit: 42e35e61f3 Built: Tue Jun 2 15:09:05 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.3.4.m GitCommit: d76c121f76a5fc8a462dc64594aea72fe18e1178.m runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683
Success with docker version command #
We have the things running correctly. Since now we can also see Server information.
Why Server and Client ? #
Well the 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.
# Enable docker service permanently sudo systemctl enable docker
3. Getting $USER for docker #
As you might have noticed, we are using sudo . In all docker commands as well.
Using 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.
# Add current user to 'docker' group sudo usermod -aG docker $USER .
This would allow us to use the docker command without sudo .
Note: After modifying the current user using above — One must restart the computer.
# After Restart we can check the version again docker version
This time without the additional sudo .
4. See if docker is working and hello-world #
Well enough talk about versions and services. Let’s see if our precious install actually does some things.
The programming essential is called Hello World .
We do have an Docker Image by that name. Let’s run it.
Note: To run the below commands you must have internet connected.
1 2 3 4 5 6 7 8 9 10 11 12
# Run the image 'hello-world' docker run --rm hello-world # Output nable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 0e03bdcc26d7: Pull complete Digest: sha256:d58e752213a51785838f9eed2b7a498ffa1cb3aa7f946dda11af39286c3db9a9 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. .
This was an output from running a container of the image hello-world .
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.
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.
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.
6. This is only the beginning of our Adventure with docker #
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 Mastodon .
How to Install Docker on Manjaro Linux
Docker is software that runs applications in a containerized environment. It helps developers in running the application on any system without worrying about the compatibility of the application with the system and dependencies.
Today, we will see how to install Docker on Manjaro Linux 21 using simple one line commands.
Installation Guide:
Following are the steps involved in installing Docker on Manjaro Linux:
Step 1: Update your system
Firstly, we will update our Manjaro machine. It can be done by running the following command:
Step 2: Install Docker
In this step, we will install Docker. To do that, execute this command:
Step 3: Start the Docker service
Once Docker is successfully installed, start the Docker service using the following command:
sudo systemctl start docker.service
Step 4: Enable the Docker service
Next, we will enable the Docker service by issuing the following command:
sudo systemctl enable docker.service
Step 5: Check Docker version
To the check the version of the Docker you have installed, run the following command:
Through this command, you can also verify if the installation has been successful or not. If the terminal returns the version number in the output, that means the installation was successful.
Step 6: Check Docker info
To see information on Docker, you can use the below-mentioned command. This will tell you how many containers are currently active. You will also see the configurations through this command.
Step 7: Run Docker without root
To run Docker as a current user, you can add your account to the docker group with the help of this command:
sudo usermod -aG docker $USER
Step 8: Reboot the system
Now that you have added all the configurations, you need to reboot your system to update the changes. Issue the following command to do that:
Step 9: How to search for a Docker image
Now that we have installed and configured Docker, we can download Docker images. To download a specific docker image, first of all, we will search for it using the command syntax mentioned below:
The docker image we are looking for is Nginx.
This command will return a list of all the Nginx Docker images that you can choose from to install.
Step 10: Install Docker image
We have decided to go with the hello-world docker image. To install it, use the pull command like this:
Step 11: Run a docker image
Once the image is downloaded, execute the following command to run it:
Step 12: Monitor Docker
Docker allows us to monitor our images, the system resources being utilized by the image etc. This can be done by using the following command:
Step 13: See installed Docker images
You can also check the list of all the installed Docker images through this command:
Step 14: See statistics of running images
To see the system resources statistics (like RAM, CPU, and network usage) being utilized by the running images, issue this command:
Step 15: Docker’s network configuration
You can also see Docker’s network configurations with the help of the following command:
In today’s guide, we saw in detail how to deploy Docker on Manjaro Linux using a few easy to follow commands. We also saw how to configure Docker. In the end, we looked at some commands to check Docker information. Docker is very simple to use on Manjaro Linux. Now that the Docker is successfully installed, you can install any docker image you want with ease and run it.
I hope you liked the tutorial.
To see how you can install Docker on Debian 11, check this out:
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.