This commit is contained in:
2021-04-19 14:52:53 +08:00
parent 31fdb9ec7b
commit 2095c0d579
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -243,8 +243,8 @@ class Snowflake
*/
public static function isDcoker(): bool
{
exec('ls -alh /.dockerenv', $output, $cod);
if ($cod === 0 && !empty($output)) {
exec('[ -f /.dockerenv ] && echo yes || echo no', $output, $cod);
if ($cod === 0 && $output === 'yes') {
return true;
}
return false;