How to measure Docker build steps duration?

BuildKit, which was experimental in 18.06 and generally available in 18.09, has this functionality built in. To configure the dockerd daemon with experimental mode, you can setup the daemon.json: $ cat /etc/docker/daemon.json { “experimental”: true } Then you can enable BuildKit from the client side with an environment variable: $ export DOCKER_BUILDKIT=1 $ docker build …

Read more

SSH agent forwarding during docker build

For Docker 18.09 and newer You can use new features of Docker to forward your existing SSH agent connection or a key to the builder. This enables for example to clone your private repositories during build. Steps: First set environment variable to use new BuildKit export DOCKER_BUILDKIT=1 Then create Dockerfile with new (experimental) syntax: # …

Read more