Detect when running in Docker (#1204)

This commit is contained in:
David Myers 2018-11-16 01:22:57 -05:00 committed by Jack Ivanov
parent 1c16554b41
commit d8b318b59a

View file

@ -46,6 +46,8 @@ if [[ -x $(command -v systemd-detect-virt) ]]; then
if [[ ${DETECT_VIRT} != "none" ]]; then
VIRTUALIZED=" (Virtualized: ${DETECT_VIRT})"
fi
elif [[ -f /.dockerenv ]]; then
VIRTUALIZED=" (Virtualized: docker)"
fi
echo "Algo running on: ${OS}${VIRTUALIZED}"