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.
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 3, 2023
1 parent a03bbb2 commit e540bca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api.php
Original file line number Diff line number Diff line change
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 e540bca

Please sign in to comment.