PHP 7.4.33
Preview: index.js Size: 449 B
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/is-docker/index.js
'use strict';
const fs = require('fs');

let isDocker;

function hasDockerEnv() {
	try {
		fs.statSync('/.dockerenv');
		return true;
	} catch (_) {
		return false;
	}
}

function hasDockerCGroup() {
	try {
		return fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');
	} catch (_) {
		return false;
	}
}

module.exports = () => {
	if (isDocker === undefined) {
		isDocker = hasDockerEnv() || hasDockerCGroup();
	}

	return isDocker;
};

Directory Contents

Dirs: 0 × Files: 6
Name Size Perms Modified Actions
105 B lrwxr-xr-x 2025-03-28 11:04:35
Edit Download
254 B lrw-r--r-- 2025-03-28 11:04:35
Edit Download
449 B lrw-r--r-- 2025-03-28 11:04:35
Edit Download
1.09 KB lrw-r--r-- 2025-03-28 11:04:35
Edit Download
747 B lrw-r--r-- 2025-03-28 11:04:35
Edit Download
341 B lrw-r--r-- 2025-03-28 11:04:35
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).