Archive for September 2025
Docker Install
Setting up Docker on Ubuntu MATE involves uninstalling old versions, setting up the repository, installing Docker Engine, and performing post-installation steps. Ubuntu MATE is based on Ubuntu, so the installation follows the standard Ubuntu process. This guide is based on the official Docker documentation as of September 2025.
Ensure your system meets the requirements:
- 64-bit Ubuntu Oracular 24.10, Noble 24.04 (LTS), or Jammy 22.04 (LTS).
- Compatible architectures: x86_64 (amd64), armhf, arm64, s390x, ppc64le (ppc64el).
- Ubuntu MATE aligns with Ubuntu LTS releases, so it should work, though not officially tested.
- Be aware of firewall limitations if using ufw or firewalld; Docker may bypass rules.
Remove any older versions or conflicting packages to avoid issues.
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
Set up Docker's official APT repository.
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
Install the latest version of Docker Engine and related tools.
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
apt-cache madison docker-ce | awk '{ print $3 }', then install using the version string, e.g., sudo apt-get install docker-ce=5:28.4.0-1~ubuntu.24.04~noble ....
Check if Docker is running and test it with a hello-world container.
sudo systemctl status docker
If not running, start it:
sudo systemctl start docker
Test Docker:
sudo docker run hello-world
To run Docker commands without sudo, add your user to the docker group.
sudo groupadd docker # If the group doesn't exist
sudo usermod -aG docker $USER
Log out and back in, or run newgrp docker for the change to take effect. Verify with docker run hello-world.
If permission issues arise with ~/.docker/, fix by changing ownership:
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "$HOME/.docker" -R
On Ubuntu, this is enabled by default. To ensure:
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
Docker Compose is included as a plugin. Use docker compose commands. Verify:
docker compose version
- Docker service not starting: Check logs with
journalctl -u docker.service. - Permission issues: Ensure your user is in the docker group or use sudo. Fix ~/.docker/ permissions if needed.
- Repository issues: Verify your Ubuntu codename (e.g., noble for 24.04) matches a supported version.
- Firewall issues: Docker may bypass ufw/firewalld; use iptables for rules in DOCKER-USER chain.
- Ubuntu MATE Specificity: As an Ubuntu derivative, the process is the same, though not officially supported.
- Docker Desktop: Not available on Linux; use the CLI and Compose plugin.
- Security: Avoid running untrusted containers, as they can access the host with root privileges. Consider rootless mode for better security.
- Uninstall: To remove, use
sudo apt-get purge docker-ce ...and delete /var/lib/docker/ if needed.