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
|
|
@ -175,6 +175,7 @@ func (sc *SyncClient) buildRequest() SyncRequest {
|
|||
LanIP: sc.cfg.LanIP,
|
||||
TailscaleIP: sc.cfg.TailscaleIP,
|
||||
CanDelete: sc.cfg.CanDelete,
|
||||
IsDocker: RunningInDocker(),
|
||||
}
|
||||
if sc.GetTaskStates != nil {
|
||||
req.Tasks = sc.GetTaskStates()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue