Getting docker installed on MX-23

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
a_freed_man
Posts: 160
Joined: Tue Nov 03, 2020 11:25 am

Getting docker installed on MX-23

#1 Post by a_freed_man »

I ran into frustrations when I attempted this on MX-21 last year and punted the effort. Last year I tried to follow the install guide for debian 11 on the docker website. I wasn't surprised it failed, since most Linux systems these days assume systemd init. I just didn't have the time to figure out how to get the install completed under MX.

This time I'm on a standard MX-23, system V init. Installed the docker, docker-compose and docker.docs packages using MX Package Manager. The verification test fails (sudo docker run hello-world). Docker is NOT in the PATH. docker-compose is though.

What are the remaining steps required to get a working docker & docker compose installation on MX-23, has anyone here been successful with that?

Code: Select all

System:
  Kernel: 6.1.0-30-amd64 [6.1.124-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-30-amd64 root=UUID=<filter> ro quiet video=1600x900
    splash
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.5_x64 Libretto September 15  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop System: LENOVO product: 10A90045US v: ThinkCentre M93p serial: <superuser required>
  Mobo: LENOVO model: SHARKBAY v: SDK0E50510 WIN serial: <superuser required> UEFI: LENOVO
    v: FBKTB9AUS date: 11/13/2015
CPU:
  Info: model: Intel Core i5-4590 bits: 64 type: MCP arch: Haswell gen: core 4 level: v3
    note: check built: 2013-15 process: Intel 22nm family: 6 model-id: 0x3C (60) stepping: 3
    microcode: 0x28
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
    L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 3536 high: 3575 min/max: 800/3700 scaling: driver: intel_cpufreq
    governor: ondemand cores: 1: 3508 2: 3522 3: 3575 4: 3540 bogomips: 26339
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW; STIBP: disabled; RSB
    filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics vendor: Lenovo
    driver: i915 v: kernel arch: Gen-7.5 process: Intel 22nm built: 2013 ports: active: VGA-1
    empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:0412 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: crocus gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26") s-diag: 584mm (22.99")
  Monitor-1: VGA-1 model: Acer KB272HL serial: <filter> built: 2021 res: 1920x1080 hz: 60 dpi: 82
    gamma: 1.2 size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9 modes: max: 1920x1080
    min: 720x400
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 4600 (HSW GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c class-ID: 0403
  Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Lenovo 8
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20 class-ID: 0403
  API: ALSA v: k6.1.0-30-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I217-LM vendor: Lenovo driver: e1000e v: kernel port: f080
    bus-ID: 00:19.0 chip-ID: 8086:153a class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 1.2 TiB used: 55.13 GiB (4.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 1TB size: 931.51 GiB
    block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 1B4QFXO7 temp: 28.9 C scheme: MBR
  ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD3200AAKS-00V6A0 size: 298.09 GiB
    block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s type: N/A serial: <filter> rev: 1D05
    scheme: GPT
Partition:
  ID-1: / raw-size: 119.82 GiB size: 117.38 GiB (97.96%) used: 10.64 GiB (9.1%) fs: ext4
    dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 100 MiB size: 98.4 MiB (98.42%) used: 274 KiB (0.3%) fs: vfat
    dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 801.76 GiB size: 788.11 GiB (98.30%) used: 44.48 GiB (5.6%) fs: ext4
    dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16.23 GiB used: 8.8 MiB (0.1%) priority: -2
    dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 32.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2177 libs: 1069 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [arch=amd64 signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb https://mxrepo.com/mx/repo/ bookworm main non-free
Info:
  Processes: 244 Uptime: 15d 19m wakeups: 1 Memory: 15.42 GiB used: 5.16 GiB (33.5%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI

User avatar
fehlix
Developer
Posts: 12700
Joined: Wed Apr 11, 2018 5:09 pm

Re: Getting docker installed on MX-23

#2 Post by fehlix »

a_freed_man wrote: Mon Feb 17, 2025 12:25 pm What are the remaining steps required to get a working docker & docker compose installation on MX-23, has anyone here been successful with that?
Maybe this:

Code: Select all

sudo apt install  cgroupfs-mount

Nokkaelaein
Posts: 279
Joined: Fri Jul 17, 2020 10:32 am

Re: Getting docker installed on MX-23

#3 Post by Nokkaelaein »

When I last used docker on MX-23, I installed the docker.io package (so, not docker at all, but docker.io, currently in version 20.10.24+dfsg1-1+deb12u1), which pulls with it containerd, runc and tini. And that's it. Straight from the MX repo, worked out of the box.

Just tested it, with no prior docker installed. Did ^ exactly the above, and

Code: Select all

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/ 

User avatar
a_freed_man
Posts: 160
Joined: Tue Nov 03, 2020 11:25 am

Re: Getting docker installed on MX-23

#4 Post by a_freed_man »

Thank you! Perfect.

Well, perhaps not perfect. I installed docker.io remotely via ssh and I saw a line complaining it couldn't open the display which makes sense. I didn't see the success message you posted, but I see docker & containerd is running so the install did work, but I'll need to look into the issue more deeply tomorrow.

Code: Select all

# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
e6590344b1a5: Pull complete 
Digest: sha256:e0b569a5163a5e6be84e210a2587e7d447e08f87a0e90798363fa44a0464a1e8
Status: Downloaded newer image for hello-world:latest
docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output: 
error: exec: "apparmor_parser": executable file not found in $PATH.
ERRO[0003] error waiting for container: context canceled 
The problem was a failure to install apparmor, probably caused by no access to the X session due to running apt-get install docker.io over ssh. I installed cgroupfs-mount as fehlix suggested, but not sure that was necessary. I then ran app install apparmor. Although I see the errors related to inability to connect to DISPLAY (during dpkg preconfigure), the installation succeeded and I was able to successfully run docker run hello-world:

Code: Select all

# apt install apparmor
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-6.1.0-28-amd64 linux-headers-6.1.0-28-common linux-image-6.1.0-28-amd64
Use 'apt autoremove' to remove them.
Suggested packages:
  apparmor-profiles-extra apparmor-utils
The following NEW packages will be installed:
  apparmor
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 616 kB of archives.
After this operation, 2,629 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 apparmor amd64 3.0.8-3 [616 kB]
Fetched 616 kB in 0s (2,013 kB/s)

(dpkg-preconfigure:852733): Gtk-WARNING **: 07:33:05.758: cannot open display: 
debconf: unable to initialize frontend: Gnome
debconf: (DISPLAY problem?)
debconf: falling back to frontend: Dialog
Preconfiguring packages ...
Selecting previously unselected package apparmor.
(Reading database ... 348416 files and directories currently installed.)
Preparing to unpack .../apparmor_3.0.8-3_amd64.deb ...
Unpacking apparmor (3.0.8-3) ...
Setting up apparmor (3.0.8-3) ...

(frontend:852780): Gtk-WARNING **: 07:33:16.348: cannot open display: 
debconf: unable to initialize frontend: Gnome
debconf: (DISPLAY problem?)
debconf: falling back to frontend: Dialog
Created symlink /etc/systemd/system/sysinit.target.wants/apparmor.service → /lib/systemd/system/apparmor.service.
Reloading AppArmor profiles 
Skipping profile in /etc/apparmor.d/disable: usr.bin.thunderbird
Processing triggers for man-db (2.11.2-2) ...

# docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Post Reply

Return to “MX Help”