provision/docker/flatten.go: reading buffer to write on file

Maybe with this we can reproduce the untar issue.
This is also debug code ;)