Created
November 3, 2020 15:06
-
-
Save diegoperini/cc4e5be3bf375d021924639bfcc100b5 to your computer and use it in GitHub Desktop.
Bash command to check if running in a Docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cat /proc/1/cgroup | grep -m 1 docker > /dev/null && echo docker) || echo baremetal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment