How to install Docker Container on Manjaro Linux

Simple steps to install, create and run Docker container on Manjaro Linux via Docker Hub to use various applications in a virtual environment.

Using virtual machines have its own advantages, it gives better consumption of hardware resource, saves costs and space. However, running each and every app on traditional virtual machines is not only time-consuming but also requires more resources. To resolve this issue, Docker comes into the scenarios. It provides us the ability to run applications instantly in a virtualized environment called Containers. These containers can build on one another and communicate with one another as well… Examples of these applications would be an Apache server or a MySQL database.

It is a lightweight alternative to regular virtual platforms that uses system-level virtualization under Linux.  The distribution of the Docker containers takes place via the Docker Hub.   Here we learn how to install Docker Container on Manjaro Linux.

Steps to install Docker Container on Manjaro Linux

1. Run system update

First of all, use the Pacman and run the system update command that not only installs the available packages but also refreshes the repository.

sudo pacman -Syu

 

2. Command to install Docker CE on Manjaro

Packages to install Docker are already there on the official repository of Manjaro, thus no need to add anything extra, just go for the command given below and you are good to go.

sudo pacman -S docker

 

3.  Start & Enable Docker Services

Once the installation is completed, the next is to start its service and also enable the same so that after every reboot, the Manjaro can automatically start the Docker Service.

sudo systemctl enable --now docker

For getting the status-

sudo systemctl status docker

To check docker versions and other information-

docker --version
docker info

 

4. Run Docker without sudo

By default, we need to use sudo with Docker command to create a container, delete, info, etc. To solve this, we need to add our local user to the Docker group. For that use this command:

sudo usermod -aG docker $USER
newgrp docker

 

5. Create Docker Container on Manjaro Linux

So far we have installed and running up the docker on our Manjaro successfully. Now, it’s time to pull an image from Docker Hub to test everything is fine or not. Here we are installing a container using Ubuntu’s latest image.

docker pull centos

To run container-

docker run -it centos

Create Docker Container on Manjaro Linux

#2nd method:

Install Docker using SNAP

If due to some reason the first method is not working then we can go for the SNAP packages. Run below commands-

#Enable Snap on Manajro

sudo pacman -S snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

#Installsudo snap install docker

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

X