Through reading a guide to a new Docker container for teaching the SCIP optimisation libary, I learnt that
You probably do not want to run containers as root, therefore you might want to follow the post-install instructions
which currently advise:
sudo groupadd docker sudo usermod -aG docker $USER newgrp docker
and then try docker run with your container of choice without sudo.
docker run
sudo
If you already ran Docker with sudo you can fix it by either deleting the ~/.docker/ directory or just chowning it
~/.docker/
chown
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R sudo chmod g+rwx "$HOME/.docker" -R
I tried this and discovered I don't actually have a ~/.docker/ directory so not sure if this always applies...
Some commands still require sudo (e.g. docker info, docker ps, docker cp), but docker run no longer requires sudo.
docker info
docker ps
docker cp
However, the docs note that docker still has root access in this setup.
docker
For a root-less (and also daemon-less) alternative see Podman
There was an error while loading. Please reload this page.