restructured docker create stream handling