Anki/docs
Omar Kohl 71e2a6f782
Introduce PUID and PGID env variables to syncserver Dockerfile (#3714)
PUID and PGID are optional env variables to specify the user and group id of
the user that the anki-sync-server process should run with.

This gives more flexibility for solving permission problems with volumes and is
a common pattern for Docker images (e.g. see here:
https://docs.linuxserver.io/general/understanding-puid-and-pgid/)

The anki-sync-server process will write any files with the permissions of the
user it's running with, which can be a problem when you need to access those
files from outside the container or when they are being written into a bind
mount that is owned by a particular user on the host system.

To be able to implement this the entrypoint.sh needs to run as root (since it
needs to create a user and change file permissions). anki-sync-server then
needs to be started with the user 'anki', which is why the new dependency
'su-exec' is required. The user 'anki' and group 'anki-group' can no longer be
created at image build time because then their ids would be fixed.

Also update the build instructions to require building the Docker image inside
the directory where the Dockerfile resides since the build now needs to copy
the entrypoint.sh and it seems wrong the specify the path
docs/syncserver/entrypoint.sh inside the Dockerfile.
2025-01-25 18:19:38 +11:00
..
docker Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
syncserver Introduce PUID and PGID env variables to syncserver Dockerfile (#3714) 2025-01-25 18:19:38 +11:00
architecture.md Updated permalink to architecture visualization (#2001) 2022-08-05 14:47:38 +10:00
build.md Migrate pylib/anki qt/aqt to group syntax (eg pylib:anki) 2023-06-15 17:17:55 +10:00
contributing.md Remove outdated comments in contributing, and mention refactoring 2024-08-10 18:43:11 +07:00
development.md Qt 6.8.1 (#3633) 2025-01-09 20:07:12 +11:00
editing.md Minor Rust cleanups (#2272) 2022-12-16 21:40:27 +10:00
linux.md Remove stale comment 2025-01-13 15:56:33 +11:00
mac.md Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
ninja.md Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
protobuf.md Migrate to protobuf-es (#2547) 2023-06-14 22:47:37 +10:00
windows.md Tweaks to Windows build instructions 2023-11-20 11:59:08 +10:00