Closed jlpoolen closed 3 years ago
Again, I'm unfamiliar with docker, but I thought it would be helpful to know what it's status is:
jlpoole@raspberrypi:~ $ sudo /etc/init.d/docker status
? docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-08-11 19:08:16 PDT; 22h ago
Docs: https://docs.docker.com
Main PID: 625 (dockerd)
Tasks: 10
CGroup: /system.slice/docker.service
+-625 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.…
Aug 12 17:14:24 raspberrypi moonfire-nvr[625]: [3B blob data]
Aug 12 17:14:24 raspberrypi moonfire-nvr[625]: [3B blob data]
Aug 12 17:14:24 raspberrypi moonfire-nvr[625]: [3B blob data]
Aug 12 17:14:24 raspberrypi moonfire-nvr[625]: [3B blob data]
Aug 12 17:14:24 raspberrypi moonfire-nvr[625]: [3B blob data]
Aug 12 17:14:24 raspberrypi moonfire-nvr[625]: [3B blob data]
Aug 12 17:14:24 raspberrypi moonfire-nvr[625]: [3B blob data]
Aug 12 17:14:24 raspberrypi moonfire-nvr[625]: [3B blob data]
Aug 12 17:14:26 raspberrypi moonfire-nvr[625]: [654B blob data]
Aug 12 17:14:26 raspberrypi dockerd[625]: time="2021-08-12T17:14:26.921525091-0…ete"
Hint: Some lines were ellipsized, use -l to show in full.
jlpoole@raspberrypi:~ $
(typing on phone; please excuse terseness)
I think usually with docker people add themselves (the admin user) to the group docker
, giving them permission to talk to the daemon. This is basically root access so it's similar to sing themselves to the sudo
group security wise. If you haven't done that, you'll need to prefix your nvr
commands with sudo
.
This is something I left implicit in the instructions and should spell out.
re: https://github.com/scottlamb/moonfire-nvr/blob/master/guide/install.md the above instructions have you: 1) create user mooonfire-nvr which you accomplish using sudo 2) create a script /usr/local/bin/nvr 3) run the script /usr/local/bin/nvr
When I do, I run into a permissions issue:
jlpoole@raspberrypi:~ $ nvr 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.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied. See 'docker run --help'. jlpoole@raspberrypi:~ $
I tried changing to user moonfire-nvr and then running the nvr script:
Here's my installation log:
The SQLite database looks to have been installed with the correct user/group and permissions:
So, something is awry vis-a-vis docker. I've not used docker before and do not know where it hides and what the appropriate permissions should be? Should docker applications be installed as root, or as the user, i.e. moonfire-nvr?