- Click the Linux Mint Menu Button at the bottom left of the screen to open the Linux Mint Menu.
- Under the "System" section, click "Software Manager".
- In the Software Manager window, use the search box at the top right and search for "docker".
- Click on "Docker.io - Linux Container Runtime".
- Click the green "Install" button at the top right. Enter your administrator password when prompted.
- Open the Linux Mint Menu again (see step 1), search for "Users and Groups", and click it to open the "User Settings".
- Click on the "Manage Groups" button, which brings up the "Group settings" window.
- Find the "docker" group, select it, and click the "Properties" button on the right side of the window to bring up the "Group 'docker' Properties" window.
- Under the "Group Members" section, check the checkbox for all the users that should be added to the
docker
group to be allowed be allowed to use Docker. NOTE: This will give these users escalated privileges on your system! - Click the "Ok" button to save the configuration. Close out the remaining dialogs by clicking the "Close" button on each.
- Restart your system. Alternatively, you can run
sudo systemctl restart docker
and log out and relogin to your desktop session or start a new login shell (see "Troubleshooting" below). If you don't do this, your user will get "Permission Denied" when running anydocker
command.
Docker is available in the default repositories. You can install via apt
:
sudo apt install docker.io
Then add yourself to the docker
group:
sudo usermod -a -G docker $(whoami)
Restart the docker
service:
sudo systemctl restart docker
and relogin, reboot, or start a new login shell (see "Troubleshooting" below).
You can check that everything is operational with Docker by running docker ps
or docker version
from the terminal:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$ docker version
Client:
Version: 20.10.7
API version: 1.41
Go version: go1.13.8
Git commit: 20.10.7-0ubuntu1~20.04.1
Built: Wed Aug 4 22:52:25 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.7
API version: 1.41 (minimum version 1.12)
Go version: go1.13.8
Git commit: 20.10.7-0ubuntu1~20.04.1
Built: Wed Aug 4 19:07:47 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.5.2-0ubuntu1~20.04.2
GitCommit:
runc:
Version: 1.0.0~rc95-0ubuntu1~20.04.2
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
Running docker ps
shows:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json: dial unix /var/run/docker.sock: connect: permission denied
- Docker Service should be running
Ensure the docker service is running:
sudo systemctl status docker
should show it in the active (running)
status.
If not, restart it with sudo systemctl restart docker
.
- Your user should be part of the 'docker' group
Ensure you're a member of the docker
group:
grep -E "^docker:" /etc/group | cut -d: -f4
Should show your user in the comma separated list. If it doesn't, add yourself to the docker
group (see instructions above).
- Your tty session should show correct group membership
Running:
id -nG
Should show docker
in the group list. If not, relogin to your system or restart the system, or use su $(whoami)
to start a new login shell (see this StackExchange answer).
- If all else fails, try restarting your computer.
It works! Thank you for this summary.
In case somebody wants to confirm the installation, one can run:
sudo docker run hello-world