small tweaks to docker instructions
* strongly encourage the single-binary approach and say why. * fix a broken link in troubleshooting guide (and regenerate toc). * add a couple more comments to the docker compose snippet
This commit is contained in:
parent
b47310644d
commit
9592fe24e8
|
@ -38,14 +38,33 @@ $ sudo install -m 755 "moonfire-nvr-$VERSION-$ARCH" /usr/local/bin/moonfire-nvr
|
|||
<table><tr><td><details>
|
||||
<summary>Docker</summary>
|
||||
|
||||
If you are a Docker fan, you can install the `ghcr.io/scottlamb/moonfire-nvr`
|
||||
Docker images instead. You'll have to adapt the instructions below to a Docker
|
||||
workflow. You may find the following Docker compose snippet useful:
|
||||
The procedure above, in which Moonfire runs directly on the host, is strongly
|
||||
recommended.
|
||||
|
||||
* The single binary installed in `/usr/local/bin` has zero dependencies.
|
||||
It is statically linked and bundles the UI. It just works. There's no
|
||||
complex distribution-specific install procedures or danger of conflicting
|
||||
version requirements between Moonfire and other software. These are the same
|
||||
problems most people use Docker to solve.
|
||||
* Moonfire's recommended install method used to involve Docker. In our
|
||||
experience, complexity around Docker commands, filesystem/process namespace
|
||||
mappings, broken seccomp defaults that do not allow standard system calls
|
||||
like `clock_gettime`, etc. has been a major frustration for folks installing
|
||||
Moonfire. Now that we have the zero-dependencies binary, we recommend
|
||||
sidestepping all of this and have rewritten the docs accordingly.
|
||||
|
||||
…but, you may still prefer Docker for familiarity or other reasons. If so, you
|
||||
can install the [`ghcr.io/scottlamb/moonfire-nvr`](https://github.com/scottlamb/moonfire-nvr/pkgs/container/moonfire-nvr) Docker images instead. We'll
|
||||
assume you know your way around your preferred tools and can adapt the
|
||||
instructions to the workflow you use with Docker. You may find the following
|
||||
Docker compose snippet useful:
|
||||
|
||||
```yaml
|
||||
version: 3
|
||||
services:
|
||||
moonfire-nvr:
|
||||
# The `vX.Y.Z` images will work on any architecture (x86-64, arm, or
|
||||
# aarch64); just pick the correct version.
|
||||
image: ghcr.io/scottlamb/moonfire-nvr:v0.7.11
|
||||
command: run
|
||||
|
||||
|
@ -73,6 +92,8 @@ services:
|
|||
- "/usr/share/zoneinfo:/usr/share/zoneinfo:ro"
|
||||
|
||||
# Edit this to match your `moonfire-nvr` user.
|
||||
# Note that Docker will not honor names from the host here, even if
|
||||
# `/etc/passwd` is passed through.
|
||||
# - Be sure to run the `useradd` command below first.
|
||||
# - Then run `echo $(id -u moonfire-nvr):$(id -g moonfire-nvr)` to see
|
||||
# what should be filled in here.
|
||||
|
|
|
@ -14,6 +14,7 @@ need more help.
|
|||
* [`"/etc/moonfire-nvr.toml" is a directory`](#etcmoonfire-nvrtoml-is-a-directory)
|
||||
* [`Error response from daemon: unable to find user UID: no matching entries in passwd file`](#error-response-from-daemon-unable-to-find-user-uid-no-matching-entries-in-passwd-file)
|
||||
* [`clock_gettime failed: EPERM: Operation not permitted`](#clock_gettime-failed-eperm-operation-not-permitted)
|
||||
* [`VFS is unable to determine a suitable directory for temporary files`](#vfs-is-unable-to-determine-a-suitable-directory-for-temporary-files)
|
||||
* [Server errors](#server-errors)
|
||||
* [`Error: pts not monotonically increasing; got 26615520 then 26539470`](#error-pts-not-monotonically-increasing-got-26615520-then-26539470)
|
||||
* [Out of disk space](#out-of-disk-space)
|
||||
|
@ -192,14 +193,15 @@ quickly enough. In the latter case, you'll likely see a
|
|||
### Docker setup
|
||||
|
||||
If you are using the Docker compose snippet mentioned in the
|
||||
[install.md](install instructions), you might run into a few unique problems.
|
||||
[install instructions](install.md), you might run into a few unique problems.
|
||||
|
||||
#### `"/etc/moonfire-nvr.toml" is a directory`
|
||||
|
||||
If you try running the Docker container with its
|
||||
`/etc/moonfire-nvr.toml:/etc/moonfire-nvr.toml:ro` mount before creating the
|
||||
config file, Docker will "helpfully" create it as a directory. Shut down
|
||||
the Docker container, remove the directory, and try again.
|
||||
the Docker container, remove the directory, create the config file,
|
||||
and try again.
|
||||
|
||||
#### `Error response from daemon: unable to find user UID: no matching entries in passwd file`
|
||||
|
||||
|
@ -207,6 +209,8 @@ If Docker produces this error, look at this section of the docker compose setup:
|
|||
|
||||
```yaml
|
||||
# Edit this to match your `moonfire-nvr` user.
|
||||
# Note that Docker will not honor names from the host here, even if
|
||||
# `/etc/passwd` is passed through.
|
||||
# - Be sure to run the `useradd` command below first.
|
||||
# - Then run `echo $(id -u moonfire-nvr):$(id -g moonfire-nvr)` to see
|
||||
# what should be filled in here.
|
||||
|
|
Loading…
Reference in New Issue