graph: change argument order of Register function

This commit is patch for following comment
FIXME: pass img as first argument

Signed-off-by: Daehyeok.Mun <daehyeok@gmail.com>
Merge pull request #7774 from somaopensource/graph_fixme

graph: change argument order of Register function
Remove volumes after build

Since these volumes are both unreferencable, and should be completely
reproducible by subsequent builds, they can be safely removed.

Resolves #6993 which was closed but not dealt with.

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)