/bin/running-in-container is in upstart 1.11-5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 | #!/bin/sh
# Return 0 if in a container, 1 if not
# if in a container, also print the container type
status container-detect 2>/dev/null | grep -q start
if [ $? -eq 0 ]; then
[ -f /run/container_type ] && cat /run/container_type
exit 0
fi
exit 1
|