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:
Deivid Soto 2026-06-03 18:09:29 +02:00
parent ccd50e7c8e
commit 2148b0e2cc
5 changed files with 42 additions and 0 deletions

View file

@ -148,6 +148,7 @@ func (d *Daemon) Register(ctx context.Context) error {
VPNMode: d.vpnMode,
VPNServer: d.vpnServer,
FunnelURL: d.funnelURL,
IsDocker: RunningInDocker(),
}
if free, total, err := DiskInfo(d.cfg.DownloadDir); err == nil {
req.DiskFreeBytes = free