docker: Add env var to control capabilities (#8552)

As it's not simple to run a container under Docker/Kubernetes as
non-root but with additional capabilities, add an internal hack.
This commit is contained in:
Jakob Borg
2022-09-26 13:39:41 +02:00
committed by GitHub
parent 1cd2f5a91f
commit 361f7ae564
3 changed files with 19 additions and 4 deletions

View File

@@ -7,9 +7,13 @@ Use the `/var/syncthing` volume to have the synchronized files available on the
host. You can add more folders and map them as you prefer.
Note that Syncthing runs as UID 1000 and GID 1000 by default. These may be
altered with the ``PUID`` and ``PGID`` environment variables. In addition
altered with the `PUID` and `PGID` environment variables. In addition
the name of the Syncthing instance can be optionally defined by using
``--hostname=syncthing`` parameter.
`--hostname=syncthing` parameter.
To grant Syncthing additional capabilities without running as root, use the
`PCAP` environment variable with the same syntax as that for `setcap(8)`.
For example, `PCAP=cap_chown,cap_fowner+ep`.
## Example Usage