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
Step 2: Install Docker
Install Docker using the following command:
sudo pacman -S docker
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
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
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
You can also run a test container to ensure everything is working:
docker run hello-world
That's it! Docker should now be installed and ready to use on your Arch Linux system.
Top comments (0)