Files
webgui/plugins/dynamix.docker.manager/Docker.page
2018-08-22 10:07:17 +02:00

28 lines
930 B
Plaintext

Menu="Tasks:60"
Type="xmenu"
Code="f100"
Cond="exec(\"grep -o '^DOCKER_ENABLED=.yes' /boot/config/docker.cfg 2>/dev/null\")"
----
<?PHP
/* Copyright 2005-2017, Lime Technology
* Copyright 2014-2017, Guilherme Jardim, Eric Schultz, Jon Panozzo.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<?
if ($var['fsState'] != "Started") {
echo "<p class='notice'>Array must be <span class='strong big'>started</span> to view Docker containers.</p>";
return;
}
if ( !is_file('/var/run/dockerd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/dockerd.pid'))) ) {
echo "<p class='notice'>Docker Service failed to start.</p>";
return;
}
?>