I have ubuntu os with docker installed.
If I run
sudo docker run hello-world
Everything is fine, however I'd like to hide the sudo command to make it shorter.
If I type the command without using sudo like below, it fails.
docker run hello-world
Obviously, I get an error stating I don't have privileges
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/create: dial unix /var/run/docker.sock: connect: permission denied. See 'docker run --help'.
Same happens with this command
docker-compose up
Anyone got any ideas?