Created
June 15, 2018 19:01
-
-
Save raphaelchaib/f6f03de96ab5d831cbf83c3ac96308e8 to your computer and use it in GitHub Desktop.
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
function dc_trace_cmd() { | |
local parent=`docker inspect -f '{{ .Parent }}' $1` 2>/dev/null | |
declare -i level=$2 | |
echo ${level}: `docker inspect -f '{{ .ContainerConfig.Cmd }}' $1 2>/dev/null` | |
level=level+1 | |
if [ "${parent}" != "" ]; then | |
echo ${level}: $parent | |
dc_trace_cmd $parent $level | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment