dockerubuntusuperuser

How can I manage to solve an issue while using su -s?


I am getting some permission issues using Docker and the following documentation suggests some command to run and one of them is su -s ${USER} but it does not work since the output is that there is no file or folder of that type, may you help me? I am on Ubuntu 16.04

This is the documentation I was following https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket


Solution

  • You can check out some post-installation steps here on how to allow docker runtime to run without being root.

    TLDR assuming you have root permissions

    sudo groupadd docker            # add the docker group if not already extant
    sudo usermod -aG docker $USER   # add the user to the group docker
    exec $SHELL                     # reload your shell