parent
b13efe688f
commit
882d295f27
2 changed files with 17 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
# Usage example: |
||||||
|
# docker-inheritance ~/git ~/docker ~/svn -name ca -prune -o -name node_modules -prune -o -name suisseid3 -prune -o | dot -Tpng > /tmp/inheritance.png; gwenview /tmp/inheritance.png |
||||||
|
|
||||||
|
( |
||||||
|
echo "digraph G {" |
||||||
|
for df in $(find $* -name 'Dockerfile' -print); do |
||||||
|
p=${df%/Dockerfile} |
||||||
|
n=mwaeckerlin/${p##*/} |
||||||
|
sed -n 's,^FROM *\([^:]*\).*,"\1" -> "'"$n"'",gp' $df |
||||||
|
done | sort | uniq |
||||||
|
echo "}" |
||||||
|
) |
||||||
|
|
Loading…
Reference in new issue