Running steps in a container has too much unexpected overhead

You can see an example of a step that took a long time (18 minutes) here:

In our existing build, running the same step on Travis CI is much faster (less than 5 minutes):

If there are any pecularities when using a Docker container, it should be documented. For example, how is the workspace being made available to the Docker container? Is it a bind-mounted directory from host? What is the Docker storage driver being used?

Hmm… Actually tried running on host, and the same step still runs way slower compared to Travis CI. Will continue to investigate…