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.
Here at LinuxAPT, we shall look into how to install Docker on Manjaro Linux 21 system.
To see how you can install Docker on Debian 11, check this out:
https://linuxapt.com/blog/808-install-docker-on-debian-11-bullseye-system
1. Perform System Update
To begin, we will update our Manjaro machine by running the following command:
$ sudo pacman -Syu
2. Install Docker
Here, we will install Docker by executing the below command:
$ sudo pacman -S docker
3. Start the Docker service
Once Docker is successfully installed, start the Docker service using the following command:
$ sudo systemctl start docker.service
4. Enable the Docker service
Next, we will enable the Docker service by running the following command:
$ sudo systemctl enable docker.service
5. Check Docker version
To the check the version of the Docker you have installed, run the following command:
$ sudo docker version
With 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.
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:
$ sudo docker info
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
8. Reboot the system
Now that you have added all the configurations, you need to reboot your system to update the changes with the following command:
$ reboot
9. Search for a Docker image on Manjaro Linux
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:
$ docker search [name]
The docker image we are looking for is Nginx, so we will execute:
$ docker search nginx
This command will return a list of all the Nginx Docker images that you can choose from to install.
10. Install Docker image
We have decided to go with the hello-world docker image. To install it, use the pull command like this:
$ docker pull hello-world
11. Run a docker image
Once the image is downloaded, execute the following command to run it:
$ docker run hello-world
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:
$ docker container ls
13. See installed Docker images
You can also check the list of all the installed Docker images through this command:
$ docker images
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:
$ docker stats
15. Docker's network configuration
You can also see Docker's network configurations with the help of the following command:
$ docker network ls
This article covers how to deploy and configure Docker on Manjaro Linux. In fact, Docker is a tool that is used to run software in a container. It's a great way for developers and users to worry less about compatibility with an operating system and dependencies because the contained software should run identically on any system.
To see which Docker containers are running and check their current status, type:
$ docker container ls
To see a list of all the Docker images installed, type:
$ docker images
To see the current CPU, RAM, and network usage of running images, type:
$ docker stats
To see Docker's network configuration, type:
$ docker network ls