Detect when running in Docker

This commit is contained in:
David E. Myers 2018-11-15 16:38:34 -05:00
parent 1c16554b41
commit 1652658f16
No known key found for this signature in database
GPG key ID: D871FCA54815086C

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}"