Is it possible to configure Docker to output timing for the build of a Dockerfile?
We run a medium sized development team and would like to collect statistics on the
I was wondering that too. The only solution I came up with for individual steps is to put date +'%F %T'
to the end of each step.
RUN set -x && apt-get update && date +'%F %T'
RUN apt-get install -y vim && date +'Time: %F %T'
Output:
Get:1 http://security.debian.org stretch/updates InRelease [63.0 kB]
...
Time: 2018-03-08 00:42:41
In Bash, you could use echo $SECONDS
which gives time since the Bash session start; or time ( ... )
(a subshell), but the Docker build environment runs in sh
, not bash
.