Installing Docker on Debian-based distros
These instructions will guide you through the process of installing Docker on Debian based systems (Debian, Ubuntu, Linux Mint, Raspberry Pi OS, etc.).
Follow the steps to install Docker and configure it to run without sudo.
Installation
Update your system
Install Docker
The easiest way to install Docker is via the official convenience script:
Verify Docker Installation
Verify Docker has been successfully installed by running:
Configuration
Configure Docker to Run Without sudo
To run Docker without using sudo, add your user to the Docker group:
After this, log out and log back in (or reboot) for the group change to take effect.
Now you should be able to run Docker commands without sudo:
Troubleshooting
If you still encounter permission issues, make sure:
- Your user is in the
dockergroup by runninggroups. - Docker is running properly by checking its status:
sudo systemctl status docker. - The Docker socket has the correct permissions:
After following these steps, Docker should be fully functional on your Linux Mint 21.3 system without needing sudo.
Removing Docker
If you want to remove Docker from your system do the following:
Stop Docker
Uninstall Docker and related packages
Remove Docker directories
This will delete Docker’s storage directories, which contain images, containers, and volumes. Make sure to back up any important data before running this command.