Is there any way to determine if a process (script) runs inside an lxc container (~ Docker runtime)? I know that some programs are able to detect whether they run inside a v
A concise way to check for docker in a bash script is:
#!/bin/bash if grep docker /proc/1/cgroup -qa; then echo I'm running on docker. fi