How to install Docker CE on MX Linux

Here are simple steps and commands to install and run Docker CE on MX Linux. Also, know how we can pull Docker images from the Docker hub.

MX Linux which would quite new for some people, however, not its core. This Linux operating system is lightweight, meant to run on both old and newer hardware or PC. MX Linux is a mixture of AntiX that gives it a core while other features it borrowed from MEPIS. Here we will talk about how one can run Docker containerized virtualization platform on MX Linux. Let’s get started.

If you accidentally stumbled on this article, then you can see the first MX Linux installation on VirtualBox, to understand and see its interface. And don’t worry, this Linux also uses APT, thus those who are coming from Debian or Ubuntu background they would not have any problem using it.

Step for Docker-CE Installation on MX Linux

Here we are using MX Linux 19, however, the steps would be the same for MX Linux 18 and 17.

Update MX Linux system

Open command terminal on MX Linux and first-run system update command to make sure everything is up to date.

sudo apt update

Setup Docker repository key

Apart from its own MXrepo, MX Linux also uses Debian and few other repositories, however, Docker is not available in the official ones, thus we need to have it add it manually. Therefore, first, we import its repo key.

wget -O docker.gpg
Add Docker repository on MX linux

Verify and add Docker repo-key to apt’s keyring

Use this command to check whether the imported key is genuine or not and after that same will be added to the apt’s trusted keyring.

gpg --keyid-format 0xlong docker.gpg 2>/dev/null | grep -sq 0x8D81803C0EBFCD88 && sudo apt-key add docker.gpg

Add Docker repo in MX Linux

Here is the command to add Docker repo on MX Linux.

echo "deb [arch=amd64] buster stable" | sudo tee

Note: Here we are installing Docker on MX Linux 19 whose code name is a buster. If you are using MX Linux 18, then replace the buster in the above command with Strech.

Run system update command

After adding the repo, again run the system update command, so that it can recognize the added repo and purge the cache.

sudo apt update

Output for the above command:

$ sudo apt update
Get:1 buster InRelease [44.4 kB] 
Get:2 buster-updates InRelease [49.3 kB] 
Hit:3 buster InRelease 
Get:4 buster InRelease [27.3 kB] 
Get:5 buster/stable amd64 Packages [10.1 kB] 
Hit:6 buster InRelease 
Get:7 buster/main i386 Packages [204 kB]
Get:8 buster/updates InRelease [39.1 kB]
Get:9 buster/main amd64 Packages [210 kB] 
Fetched 585 kB in 23s (25.8 kB/s) 
Reading package lists... Done
Building dependency tree 
Reading state information... Done
50 packages can be upgraded. Run 'apt list --upgradable' to see them.

Command to install Docker on MX Linux

Finally, here is the command download and setup Docker:

sudo apt install docker-ce

After the installation, it automatically gets started no need to do anything else.

apt install docker on mx linux

Run Docker without sudo

By default, with every command of Docker we have to use sudo, it is because this container platform only runs on root-level permission.  While installing, it already has created a docker group that can access Unix socket owned only by the root user, so to add your current user in its group to run Docker commands without sudo, use this syntax.

sudo groupadd docker

sudo gpasswd -a $USER docker

newgrp docker


Install Linux Image from Docker Hub

So, let’s try to set up Ubuntu on the MX Linux installed Docker to see whether it is working fine or not.

Here is the command to fetch Ubuntu image:

docker pull ubuntu

The above command by default it pulls the Ubuntu latest image available on the Docker hub to install for the container.

Run the pulled image:

Now to run Ubuntu, type

docker run -t ubuntu
docker install ubuntu MX linux

In this way we can set up a containerized virtualization platform on MX Linux, if you want to know anything else, let us know, the comment section is all yours!

Know more about Docker and its installations on Windows and Linux



1 thought on “How to install Docker CE on MX Linux”

Leave a Comment

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