feat(agent): report isDocker so the web shows a docker pull command
The binary self-update hard-stops inside a container (internal/upgrade refuses when /.dockerenv exists), so the web's in-app 'force update' button is futile for Docker agents. Report whether we run in a container via a new RunningInDocker() helper (UNARR_DOCKER env baked into the image, /.dockerenv fallback for podman/containerd) on every register + sync, so the web can swap the button for a copy-paste 'docker compose pull' command.
This commit is contained in:
parent
ccd50e7c8e
commit
2148b0e2cc
5 changed files with 42 additions and 0 deletions
|
|
@ -93,6 +93,12 @@ ENV UNARR_CONFIG_DIR=/config
|
|||
ENV UNARR_DOWNLOAD_DIR=/downloads
|
||||
ENV XDG_DATA_HOME=/data
|
||||
|
||||
# Mark this as a container install so the agent reports isDocker=true to the web
|
||||
# (which then shows a `docker pull` command instead of the in-app update button —
|
||||
# the binary self-update refuses to run in Docker). Covers podman/containerd too,
|
||||
# which don't create /.dockerenv. See internal/agent/RunningInDocker.
|
||||
ENV UNARR_DOCKER=1
|
||||
|
||||
# NVIDIA passthrough defaults. `--gpus all` alone only grants the "utility" +
|
||||
# "compute" capabilities; nvenc needs "video", and "graphics" makes the runtime
|
||||
# mount the NVIDIA Vulkan ICD (nvidia_icd.json — the load-bearing piece — plus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue