Docker is a software solution created to help you create, deploy and run containerized applications. With containers an application can be packaged as a single unit(container) with its dependencies and libraries, making it easy to ship across infrastructures and cloud environments. In this short article we explain how to install Docker CE on MX Linux 19 system.

There are two standard editions of Docker Engine that can be installed on MX Linux 19:

  • Docker Enterprise edition
  • Docker Community edition

Here we’ll perform an installation of Docker CE on MX Linux 19. This is a free to use edition, but without technical support from Docker Inc. If you’re keen on support consider switching to Docker Enterprise release.

Step 1: Add Docker CE repository

Perform APT package index update:

$ sudo apt update
[sudo] password for daylifetips: 
Get:1 https://mirror.liquidtelecom.com/mxlinux/packages/mx/repo buster InRelease [19.8 kB]
Get:2 https://mirror.liquidtelecom.com/mxlinux/packages/mx/repo buster/main amd64 Packages [423 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]                              
Get:4 https://mirror.liquidtelecom.com/mxlinux/packages/mx/repo buster/main i386 Packages [415 kB] 
Hit:5 http://deb.debian.org/debian buster InRelease                                                
Get:6 https://deb.opera.com/opera-stable stable InRelease [2,591 B] 
Get:7 http://deb.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:8 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
Get:9 https://deb.opera.com/opera-stable stable/non-free amd64 Packages [1,817 B]
Get:10 http://deb.debian.org/debian-security buster/updates/main amd64 Packages [270 kB]
Get:11 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,063 B]
Get:12 http://deb.debian.org/debian-security buster/updates/main i386 Packages [269 kB]
Get:13 http://deb.debian.org/debian-security buster/updates/main Translation-en [145 kB]
Fetched 1,666 kB in 2s (820 kB/s)                            
Reading package lists... Done
Building dependency tree       
Reading state information... Done

Install below tools which are dependent in repository addition.

sudo apt install ca-certificates gnupg-agent apt-transport-https curl software-properties-common -y

Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

Add Docker CE repository on MX Linux system.

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

Step 2: Install Docker CE on MX Linux 19

Update the apt package index:

$ sudo apt-get update
Hit:1 https://mirror.liquidtelecom.com/mxlinux/packages/mx/repo buster InRelease
Get:2 https://download.docker.com/linux/debian buster InRelease [44.4 kB]                          
Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease                                       
Hit:4 http://deb.debian.org/debian buster-updates InRelease                                        
Get:5 https://download.docker.com/linux/debian buster/stable amd64 Packages [15.7 kB]
Hit:6 http://deb.debian.org/debian buster InRelease                       
Hit:7 https://deb.opera.com/opera-stable stable InRelease
Hit:8 http://deb.debian.org/debian-security buster/updates InRelease
Fetched 60.2 kB in 1s (57.7 kB/s)
Reading package lists... Done

Run below commands to install Docker CE on MX Linux 19:

sudo apt install docker-ce docker-ce-cli containerd.io

Start Docker service

$ sudo service docker start
[....] Starting Docker:

Enable docker service

$ sudo update-rc.d docker enable

Add your user account to docker group:

sudo usermod -aG docker $USER
newgrp $USER

Check Docker version:

$ sudo docker version
Client: Docker Engine - Community
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:17:34 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:28 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Test docker is working by pulling the latest Alpine Linux docker image.

$ sudo docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
596ba82af5aa: Pull complete 
Digest: sha256:d9a7354e3845ea8466bb00b22224d9116b183e594527fb5b6c3d30bc01a20378
Status: Downloaded newer image for alpine:latest
docker.io/library/alpine:latest

List available images:

$ sudo docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
alpine       latest    7731472c3f2a   11 days ago   5.61MB

Run container

$ sudo docker run -it --rm alpine sh
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.13.0
PRETTY_NAME="Alpine Linux v3.13"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
/ # exit

We have installed and confirmed Docker CE to be working on MX Linux 19 system. Check more articles related to management of MX Linux.

Install KDE Desktop Environment on MX Linux

Install Opera Web Browser on MX Linux

How To Install Google Chrome on MX Linux

LEAVE A REPLY

Please enter your comment!
Please enter your name here