From e540bca1d4a24f671b6e28e3257cbe809531c8e8 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Sun, 2 Apr 2023 19:42:28 -0300 Subject: [PATCH] Expose docker tag information using the API This information is available since the introduction of `versions` file. Docker info is shown by `pihole -v` and the web interface footer, but it was never added to the versions API. Signed-off-by: RD WebDesign --- api.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api.php b/api.php index 213512fd4..6fcf8768b 100644 --- a/api.php +++ b/api.php @@ -71,6 +71,13 @@ $branches = array('core_branch' => $core_branch, 'web_branch' => $web_branch, 'FTL_branch' => $FTL_branch, ); + if (isset($versions['DOCKER_VERSION'])) { + // Docker info is available only inside containers + $updates['docker_update'] = $docker_update; + $current['docker_current'] = $docker_current; + $latest['docker_latest'] = $docker_latest; + } + $data = array_merge($data, $updates); $data = array_merge($data, $current); $data = array_merge($data, $latest);