A set of automated bash scripts to completely clean, prepare, and install Docker Engine and Docker Compose on Linux Mint (versions 20, 21, and 22).
These scripts use the official Docker DEB822 repository format and ensure that your system uses the correct upstream Ubuntu codename (e.g., noble, jammy, focal) rather than the Mint-specific codename, preventing "404 Not Found" repository errors.
- Complete Cleanup: Removes old, conflicting packages (
docker.io,podman-docker,containerd,runc). - Prerequisites Check: Automatically installs necessary tools (
curl,ca-certificates). - Official Keyring: Securely downloads and configures the official Docker GPG key.
- Smart Repo Configuration: Automatically detects your OS version and adds the correct upstream Ubuntu repository.
- Post-Installation Setup: Automatically creates the
dockergroup and adds your current user to it.
| Linux Mint Version | Ubuntu Base | Supported | Script File |
|---|---|---|---|
| 22.x (Wilma, Zena) | 24.04 (Noble) | ✅ Yes | docker-install-mint22.sh |
| 21.x (Vanessa, etc.) | 22.04 (Jammy) | ✅ Yes | docker-install-mint21.sh |
| 20.x (Ulyana, etc.) | 20.04 (Focal) | ✅ Yes | docker-install-mint20.sh |
| 19.x (Tara, etc.) | 18.04 (Bionic) | ❌ EOL | Unsupported / Removed |
Note: Linux Mint 19 is End of Life (EOL) and is no longer supported by this tool.
git clone [https://github.com/amberlex78/docker-install.git](https://github.com/amberlex78/docker-install.git)
cd docker-installChoose the script corresponding to your Linux Mint version. For example, for Mint 22:
chmod +x docker-install-mint22.sh./docker-install-mint22.shThe script automatically adds your user to the docker group so you can run Docker commands without sudo. However, Linux requires you to refresh your user session for this group change to take effect.
After the script finishes, you must:
- Log out of your desktop session and log back in (or simply reboot your computer).
- Verify the installation by running:
docker run hello-worldTransparency is important when running automated scripts with sudo. Here is the exact workflow:
- Updates APT package indexes.
- Stops any running
docker.socketservices. - Purges old/conflicting Docker packages and deletes
/var/lib/docker(⚠️ Warning: This deletes existing containers/volumes). - Installs
curlandca-certificates. - Downloads Docker's official GPG key to
/etc/apt/keyrings/. - Creates a new repository entry in
/etc/apt/sources.list.d/docker.sources. - Installs
docker-ce,docker-ce-cli,containerd.io, and build/compose plugins. - Adds the current
$USERto thedockergroup.
Pull requests are welcome! If you find a bug or have a suggestion, please open an issue first to discuss what you would like to change.