How to Install Docker on Arch Linux
Anjan Shomodder

Anjan Shomodder @thatanjan

About: Full stack developer, instructor of Cules Coding and DSA with JS YouTube channel, and blogger.

Joined:
Mar 23, 2024

How to Install Docker on Arch Linux

Publish Date: Feb 11
7 2

Today, you will learn how to install docker on Linux or more specifically, Arch Linux. You can follow the steps for debian and Red Hat based systems as well. Just the package installation will be bit different.

Check the docs:

Video

Step 1: Update the System (Optional)

Update the system with:

sudo pacman -Syu
Enter fullscreen mode Exit fullscreen mode

Step 2: Install Docker

Install Docker using the following command:

sudo pacman -S docker
Enter fullscreen mode Exit fullscreen mode

Step 3: Start and Enable Docker Service

Start the Docker service and enable it to start on boot:

sudo systemctl start docker
sudo systemctl enable docker
Enter fullscreen mode Exit fullscreen mode

Step 4: Add User to Docker Group

To avoid using sudo with every Docker command, add your user to the Docker group:

sudo usermod -aG docker $USER
Enter fullscreen mode Exit fullscreen mode

After adding the user to the Docker group, log out and log back in for the changes to take effect.

Step 5: Verify Docker Installation

Verify that Docker is installed correctly by running:

docker --version
Enter fullscreen mode Exit fullscreen mode

You can also run a test container to ensure everything is working:

docker run hello-world
Enter fullscreen mode Exit fullscreen mode

That's it! Docker should now be installed and ready to use on your Arch Linux system.

Comments 2 total

Add comment