Closed mxschmitt closed 6 years ago
Use:
if [ -f "${root}/.dockerinit" ]; then
echo docker
fi
to detect docker and:
if [ -d "${root}/proc/vz" -a ! -d "${root}/proc/bc" ]; then
echo openvz
fi
to detect openvz. (Extracted from the virt-what source code.
Remove the unnecessary dependency virt-what and use other methods to detect openvz and docker.