TrueNAS/FreeNAS – Use the GUI !

While testing out TrueNAS SCALE, I wanted to do some Docker-ing, and following best-practices, I tried to configure non-root access to the Docker daemon.

Fail !

I had added my username to the existing docker group:

sudo usermod -aG docker $USER

But I was still unable to use Docker, unless I was root:

docker ps
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied

I traced it down to the permissions on the /var/run/docker.sock, which was

ls -l /var/run/docker.sock
srw-rw---- 1 root docker 0 Dec 30 12:17 /var/run/docker.sock

Running sudo chmod 666 /var/run/docker.socket worked, but didn't survive the reboot.

Finally figured it out that the GUI still didn't show my username being in the docker group.

Once I used the GUI to add my username to the docker group, everything was peachy.

docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

Looking at the forums for FreeNAS/TrueNAS, it has been recommended many times to use the GUI to configure just about anything the GUI can do, as a lot of command-line-configured options won't survive a reboot.

Lesson learned!