Created
November 12, 2020 14:49
-
-
Save Cadichon/6aac5a09cf94c45a640a19b8da7f9097 to your computer and use it in GitHub Desktop.
check if running inside docker container
This file contains hidden or 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
| running_in_docker() { | |
| #shellcheck disable=SC2034 | |
| (awk -F/ '$2 == "docker"' /proc/self/cgroup | read -r non_empty_input) > /dev/null 2>&1 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment