Successfully pulled an image but can't run it

I am new to Docker. Installed it successfully on my Ubuntu server. Then pulled That seemed OK but I can’t run it.

roel@ubuntu:~$ sudo docker pull
latest: Pulling from linuxserver/sabnzbd
Digest: sha256:24a54a5ed9a1c7176fa24ebc30bc05a97235aced5d693411aa70bf9cdc8adc93
Status: Image is up to date for
roel@ubuntu:~$ docker run -d \
> --name=sabnzbd \
> -e PUID=1000 \
> -e PGID=1000 \
> -e TZ=Europe/Amsterdam \
> -p 8080:8080 \
> -v /home/roel/comms/sabnzbd:/config \
> -v /home/roel/comms/downloads/complete:/downloads \
> -v /home/roel/comms/downloads/incomplete:/incomplete-downloads \
> --restart unless-stopped \
-bash: No such file or directory
roel@ubuntu:~$ docker ps
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

There are multiple problems here.

  1. You build the image using sudo, so you have access to the docker socket, but then you try to run the container without sudo and you don’t have access to the socket. Your user is probably not in the “docker” group.
  2. You also have a “no such file or directory” error message which indicates that the line break is wrong before the image name. Maybe a space after the backslash so the image name is executed as a command in the shell instead of using it as a parameter of the docker command.

Thank you, that was fast! I try to learn as fast as you answered, making good progresss. This is really interesting.