Note that the results might depend on the filesystem driver you use for docker. I typically see an overhead of about 260ms using overlayfs for creating a fresh container (on Linux with a 4.4 kernel )
You reuse the stop container (confused me at first). I thought you would spin up the container and then use exec to run the shell script.
When I do that I get:
that should be the overhead of the docker daemon. I’m still puzzled this is really 44ms.
Talking to a local docker-daemon and streaming the result back should not take 44ms …