Installing Docker with Snap
This is how to install the Docker from the Snap repository.
Install Prerequisites
For the installation the snap package manager is used.
Allow Usage by other Root User
Other than the root cannot control Docker.
In order to allow control, access to the file /var/run/docker.sock must be granted.
A fast hack would be to change the file permissions.
Add Docker Group
# Add the group with an id less then 1000.
sudo addgroup --system docker
# Add the group to the current user.
sudo usermod -aG docker "${USER}"
# Add tread and write permissions to the 'docker' file/socket.
sudo setfacl -m g:docker:rw /var/run/docker.sock
Final Check
To check if it worked out, run the hello-world container.