Created
August 14, 2018 03:39
-
-
Save xgz123/e55e0834853608a7bcefecfbfcde5a48 to your computer and use it in GitHub Desktop.
docker history
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
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