Complete residential site build with Docker Compose & Gitea Actions deployment

This commit is contained in:
CalebLewallen
2026-05-13 17:31:20 -04:00
parent f9c4e13a50
commit 3c22823f72
19354 changed files with 2097331 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import fs from 'node:fs';
let isDockerCached;
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;
}
}
function hasDockerMountInfo() {
try {
return fs.readFileSync('/proc/self/mountinfo', 'utf8').includes('/docker/containers/');
} catch {
return false;
}
}
export default function isDocker() {
isDockerCached ??= hasDockerEnv() || hasDockerCGroup() || hasDockerMountInfo();
return isDockerCached;
}