Skip to content

Commit

Permalink
Expose docker tag information using the API
Browse files Browse the repository at this point in the history
This information is available since the introduction of `versions` file.
The 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 <github@rdwebdesign.com.br>
  • Loading branch information
rdwebdesign committed Apr 2, 2023
1 parent a03bbb2 commit 284267a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api.php
Expand Up @@ -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);
Expand Down

0 comments on commit 284267a

Please sign in to comment.